Author: Kevin Schoon [me@kevinschoon.com]
Hash: f97a84932e85360d0a52dae9107a2fcc1b33ecdb
Timestamp: Wed, 08 May 2024 08:16:38 +0000 (1 week ago)

+4 -2 +/-2 browse
parameterize multiuser container base image
1diff --git a/containers/multiuser/Containerfile b/containers/multiuser/Containerfile
2index d3f9232..2ad0efa 100644
3--- a/containers/multiuser/Containerfile
4+++ b/containers/multiuser/Containerfile
5 @@ -1,4 +1,5 @@
6- FROM registry.ayllu-forge.org/projects/ayllu:main
7+ ARG BASE_IMAGE=registry.ayllu-forge.org/projects/ayllu:main
8+ FROM $BASE_IMAGE
9
10 USER root
11
12 diff --git a/scripts/build_container.sh b/scripts/build_container.sh
13index cc10c6e..5ba4ed9 100755
14--- a/scripts/build_container.sh
15+++ b/scripts/build_container.sh
16 @@ -22,12 +22,13 @@ if [ "$FLAVOR" = "base" ]; then
17 else
18 DETAILED_TAG="$FLAVOR-$COMMIT_ID"
19 FRIENDLY_TAG="$FLAVOR-$BRANCH_NAME"
20+ EXTRA_ARGS=--build-arg=BASE_IMAGE="$REGISTRY/$IMAGE_NAME:$COMMIT_ID"
21 fi
22
23 podman \
24 build --network=host \
25 -t "$REGISTRY/$IMAGE_NAME:$DETAILED_TAG" \
26- -f "$TARGET_DIR/Containerfile" .
27+ -f "$TARGET_DIR/Containerfile" ${EXTRA_ARGS} .
28
29 podman tag \
30 "$REGISTRY/$IMAGE_NAME:$DETAILED_TAG" "$REGISTRY/$IMAGE_NAME:$FRIENDLY_TAG"