21 lines
669 B
Bash
Executable File
21 lines
669 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
BASE_IMAGE=$(git config get toolbox-dev-env.base-image.name)
|
|
if git config get toolbox-dev-env.base-image.version-script &>/dev/null; then
|
|
BASE_IMAGE_VERSION=$(eval $(git config get toolbox-dev-env.base-image.version-script))
|
|
else
|
|
BASE_IMAGE_VERSION=$(git config get toolbox-dev-env.base-image.version)
|
|
fi
|
|
BUILD_NONCE=$(git rev-parse HEAD)
|
|
|
|
ENV_NAME=$(git config get toolbox-dev-env.name)
|
|
|
|
podman build . \
|
|
--tag "localhost/${ENV_NAME}:latest" \
|
|
--build-arg BASE_IMAGE="${BASE_IMAGE}" \
|
|
--build-arg BASE_IMAGE_VERSION="${BASE_IMAGE_VERSION}" \
|
|
--build-arg BUILD_NONCE="${BUILD_NONCE}" \
|
|
--build-arg ENV_NAME="${ENV_NAME}"
|