Skip to content

Commit

Permalink
Update and add docker-related scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jul 19, 2024
1 parent 84553ed commit 91a775a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

BUILD_TYPE=$1
if [ -z "$BUILD_TYPE" ]; then
echo "Please specify a build type (dev, interactive, lua, prod)"
echo 'Please specify a build type:'
echo ' dev | interactive | lua | prod'
exit 1
fi

cd ..
docker build --no-cache -t algernon_$BUILD_TYPE -f docker/$BUILD_TYPE/Dockerfile .
docker build --platform linux/amd64 --no-cache -t algernon_$BUILD_TYPE -f docker/$BUILD_TYPE/Dockerfile .
13 changes: 13 additions & 0 deletions docker/push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

docker tag algernon_prod xyproto/algernon:prod
docker tag algernon_dev xyproto/algernon:dev
docker tag algernon_interactive xyproto/algernon:interactive
docker tag algernon_lua xyproto/algernon:lua
docker tag xyproto/algernon:interactive xyproto/algernon:latest

docker push xyproto/algernon:prod
docker push xyproto/algernon:dev
docker push xyproto/algernon:interactive
docker push xyproto/algernon:lua
docker push xyproto/algernon:latest
3 changes: 2 additions & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

RUN_TYPE=$1
if [ -z "$RUN_TYPE" ]; then
echo "Please specify a run type (dev, interactive, lua, prod)"
echo 'Please specify a run type:'
echo ' dev | interactive | lua | prod'
exit 1
fi

Expand Down

0 comments on commit 91a775a

Please sign in to comment.