-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild_docker.sh
executable file
·28 lines (24 loc) · 1.06 KB
/
build_docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# ===========================================================================
# File: build_docker.sh
# Description: usage: ./build_docker.sh
# ===========================================================================
# exit when any command fails
set -e
echo "Start building webhook Relay docker image ..."
docker build -f ./Dockerfile\
--build-arg GO_VERSION="$(go version)" \
--build-arg GIT_COMMIT="$(git rev-parse HEAD)"\
--build-arg BUILD_TIME="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--build-arg BUILD_USER="$(id -u -n)" \
-t bytebase/relay .
echo "${GREEN}Completed building Bytebase webhook Relay Docker image.${NC}"
echo ""
echo "Command to tag and push the image"
echo ""
echo "$ docker tag bytebase/relay latest; docker push bytebase/relay:latest"
echo ""
echo "Command to start Bytebase webhook Relay on http://localhost:8080"
echo ""
echo "docker run --init --name relay --restart always --publish 8080:2830 bytebase/relay --ref-prefix=refs/heads/release/ --lark-url=https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxxx"
echo ""