Skip to content

Commit edefaa1

Browse files
committed
Add build script
1 parent af06195 commit edefaa1

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ COPY --from=builder /etc/passwd /etc/passwd
2323
COPY --from=builder /usr/src/app/discord-bot ./discord-bot
2424

2525
CMD ["./discord-bot"]
26-

docker-build

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
if [ -z "$BOT_VERSION" ]; then
2+
echo "환경변수 BOT_VERSION 를 세팅하세요. Docker 태그로 이용됩니다. ex) 1.2.3"
3+
exit;
4+
fi
5+
6+
if [ ! -f deploy.priv_key ]; then
7+
echo "deploy.priv_key 파일을 현재 디렉토리 ( $(pwd) ) 에 위치하세요."
8+
exit;
9+
fi
10+
11+
docker build -f Dockerfile \
12+
-t "docker.pkg.github.com/qolplus/discord-bot/discord-bot:$BOT_VERSION" \
13+
--build-arg SSH_PRIV_KEY="$(cat deploy.priv_key)" .

0 commit comments

Comments
 (0)