Skip to content

Commit

Permalink
support docker images with vendor prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanczuk committed Jan 20, 2024
1 parent 0810e03 commit 30b12b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/api/scripts/buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
set -e

DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
VENDOR_PREFIX=$(node -p "require('$DIR/../../../packages/constants').VendorPrefix")

rm -rf $DIR/../buildx
docker buildx build -t letsgo-api:${TURBO_HASH:-unknown} -f $DIR/../Dockerfile $DIR/../../../
docker buildx build -t ${VENDOR_PREFIX}-api:${TURBO_HASH:-unknown} -f $DIR/../Dockerfile $DIR/../../../
mkdir -p $DIR/../buildx
printf "%s" ${TURBO_HASH:-unknown} > $DIR/../buildx/tag
3 changes: 2 additions & 1 deletion apps/web/scripts/buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
set -e

DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
VENDOR_PREFIX=$(node -p "require('$DIR/../../../packages/constants').VendorPrefix")

rm -rf $DIR/../buildx
docker buildx build -t letsgo-web:${TURBO_HASH:-unknown} -f $DIR/../Dockerfile $DIR/../../../
docker buildx build -t ${VENDOR_PREFIX}-web:${TURBO_HASH:-unknown} -f $DIR/../Dockerfile $DIR/../../../
mkdir -p $DIR/../buildx
printf "%s" ${TURBO_HASH:-unknown} > $DIR/../buildx/tag
3 changes: 2 additions & 1 deletion apps/worker/scripts/buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
set -e

DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
VENDOR_PREFIX=$(node -p "require('$DIR/../../../packages/constants').VendorPrefix")

rm -rf $DIR/../buildx
docker buildx build --platform linux/amd64 -t letsgo-worker:${TURBO_HASH:-unknown} -f $DIR/../Dockerfile $DIR/../../../
docker buildx build --platform linux/amd64 -t ${VENDOR_PREFIX}-worker:${TURBO_HASH:-unknown} -f $DIR/../Dockerfile $DIR/../../../
mkdir -p $DIR/../buildx
printf "%s" ${TURBO_HASH:-unknown} > $DIR/../buildx/tag

0 comments on commit 30b12b4

Please sign in to comment.