Pin platform for docker build
This commit is contained in:
parent
55592b1cc6
commit
c496a68726
|
|
@ -1,5 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=$(git log -1 --pretty=%h)
|
||||
REPO="iterativ/vbv-lernwelt-django"
|
||||
TAG="$REPO$VERSION"
|
||||
LATEST="${REPO}latest"
|
||||
BUILD_TIMESTAMP=$( date '+%F_%H:%M:%S' )
|
||||
|
||||
# script should fail when any process returns non zero code
|
||||
set -ev
|
||||
|
||||
|
|
@ -7,8 +13,10 @@ set -ev
|
|||
npm run build
|
||||
|
||||
# create and push new docker container
|
||||
docker build -f compose/django/Dockerfile -t iterativ/vbv-lernwelt-django .
|
||||
docker buildx build --platform=linux/amd64 -f compose/django/Dockerfile -t "$TAG" -t "$LATEST" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" .
|
||||
docker push iterativ/vbv-lernwelt-django
|
||||
docker push "$TAG"
|
||||
docker push "$LATEST"
|
||||
|
||||
# deploy to caprover
|
||||
caprover deploy -h https://captain.control.iterativ.ch -a vbv-lernwelt -i docker.io/iterativ/vbv-lernwelt-django
|
||||
|
|
|
|||
Loading…
Reference in New Issue