summaryrefslogtreecommitdiffstats
path: root/build/buildah-remote.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/buildah-remote.sh')
-rw-r--r--build/buildah-remote.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/build/buildah-remote.sh b/build/buildah-remote.sh
index 5e9d038..7cb0eeb 100644
--- a/build/buildah-remote.sh
+++ b/build/buildah-remote.sh
@@ -3,9 +3,12 @@
set -o errexit
image="$1"
-[ -n "$image" ] || { echo "Usage: $0 <astra|ccpi|ufo|tomo|imageX>"; exit 1; }
+[ -n "$image" ] || { echo "Usage: $0 <astra|ccpi|ufo|tomo|imageX> [tag]"; exit 1; }
-container=$(buildah from ${image}:latest)
+tag=latest
+[ -n "$2" ] && tag="$2"
+
+container=$(buildah from ${image}:${tag})
buildah config --port 2222/tcp --port 8888/tcp $container
buildah run $container sh -c 'apt-get install -y supervisor'
@@ -36,6 +39,6 @@ exitcodes=0
EOF
'
-buildah commit --format docker $container ${image}-remote:latest
+buildah commit --format docker $container ${image}-remote:${tag}
-echo "$container build from ${image} and saved as ${image}-remote"
+echo "$container build from ${image}:${tag} and saved as ${image}-remote:${tag}"