Skip to content

Instantly share code, notes, and snippets.

@evilr00t
Created October 8, 2021 13:05
Show Gist options
  • Save evilr00t/4fd2d7b6b3384079b8f7306e352a214f to your computer and use it in GitHub Desktop.
Save evilr00t/4fd2d7b6b3384079b8f7306e352a214f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
# Leave as it is...
DIRECTORY=$(cd "$(dirname "$0")" && pwd)
CONTAINER_NAME=${DIRECTORY##*/}
if [ -z "$GEMFURY_TOKEN" ]; then echo "GEMFURY_TOKEN is empty - set it up first" && exit 1; fi
docker buildx build --build-arg GEMFURY_TOKEN="${GEMFURY_TOKEN}" --tag "${CONTAINER_NAME}":base --file Dockerfile.base --load .
docker buildx build --build-arg GEMFURY_TOKEN="${GEMFURY_TOKEN}" --build-arg BASE_IMAGE="${CONTAINER_NAME}":base --tag "${CONTAINER_NAME}":deps --file Dockerfile.deps --load .
docker buildx build --build-arg GEMFURY_TOKEN="${GEMFURY_TOKEN}" --build-arg BASE_IMAGE="${CONTAINER_NAME}":deps --tag "${CONTAINER_NAME}" --file Dockerfile --load .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment