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:
4 files changed
+6
-6
No files matched your search
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user