refactor: run infra as a profile on the base image

The infra image was identical to base. config.sh can now set image= to
reuse another image, so infra no longer needs to be built and pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-08 11:46:59 +01:00
1 parent 4d657656cd
commit 410e6e6410
4 files changed
+6 -6

No files matched your search

+4 -3
View File
@@ -60,16 +60,17 @@ main() {
else
die "no container name specified"
fi
local name="${image%:*}"
local name="${image%:*}" tag="${image#*:}"
image="$name" # config.sh may override (e.g. image=base).
# Start/Restart if not running or if arguments change configuration.
if [[ -z "$(podman ps -q -f name="^$name$" -f status=running)" ]] || (($# > 0)); then
log "starting $image..."
log "starting $name:$tag..."
default_args
param_args "$@"
podman run --replace --stop-timeout 0 -td "${run_opts[@]}" "${DEVC_REGISTRY:-git.plabble.org/job79}/$image"
podman run --replace --stop-timeout 0 -td "${run_opts[@]}" "${DEVC_REGISTRY:-git.plabble.org/job79}/$image:$tag"
fi
exec podman exec --detach-keys "ctrl-@,ctrl-@" -it "$name" ${DEVC_COMMAND:-bash -l}