30 lines
724 B
Bash
Executable File
30 lines
724 B
Bash
Executable File
#!/bin/sh
|
|
set -ef
|
|
cd "$(dirname "$0")/.."
|
|
|
|
IMAGE_VERSION="${IMAGE_VERSION:-bookworm-v0.0.1}"
|
|
BASETAG="${BASETAG:-bookworm-slim}"
|
|
|
|
set -a
|
|
BUILDAH_FORMAT="${BUILDAH_FORMAT:-docker}"
|
|
BUILDAH_ISOLATION="${BUILDAH_ISOLATION:-chroot}"
|
|
BUILDAH_NETWORK="${BUILDAH_NETWORK:-host}"
|
|
set +a
|
|
|
|
img="docker.io/rockdrilla/graalvm-debian:base-${IMAGE_VERSION}"
|
|
|
|
buildah bud --network="${BUILDAH_NETWORK}" \
|
|
-f ./Dockerfile.base \
|
|
-t "${img}" \
|
|
--pull=missing --no-cache --squash \
|
|
--build-arg "BASETAG=${BASETAG}" \
|
|
|
|
|
|
c=$(buildah from --pull=never "${img}") || true
|
|
if [ -z "$c" ] ; then
|
|
buildah rmi -f "${img}"
|
|
exit 1
|
|
fi
|
|
buildah config --created-by /usr/local/share/Dockerfile.base "$c"
|
|
buildah commit --rm --squash "$c" "${img}"
|