From 91a775addc48f14805e36862f1369b0b79621697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Fri, 19 Jul 2024 23:26:05 +0200 Subject: [PATCH] Update and add docker-related scripts --- docker/build.sh | 5 +++-- docker/push.sh | 13 +++++++++++++ docker/run.sh | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 docker/push.sh diff --git a/docker/build.sh b/docker/build.sh index 560e82af..f3010a06 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -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 . diff --git a/docker/push.sh b/docker/push.sh new file mode 100755 index 00000000..7a676dc9 --- /dev/null +++ b/docker/push.sh @@ -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 diff --git a/docker/run.sh b/docker/run.sh index da2176cb..bcf776ec 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -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