Don't remove the container when `DEBUG` variable is set
* And get rid of the `sleep infinity` hack instead; one can simply start the container again * Document the workflow for instigating build failures
This commit is contained in:
parent
979426f0b0
commit
8a695d628b
|
@ -103,6 +103,12 @@ edit `~/.config/containers/storage.conf` (or `/etc/containers/storage.conf` for
|
|||
system-wide configuration) to set `runroot` and `graphroot` to different
|
||||
locations.
|
||||
|
||||
### Investigation of build failures
|
||||
By default, `makecontainerpkg` starts the container via `--rm` so the container
|
||||
is removed in the end. Set `DEBUG=1` to prevent that. Then one can use e.g.
|
||||
`podman container start …` and `podman container exec -it … bash` to enter the
|
||||
container for manual investigation.
|
||||
|
||||
---
|
||||
|
||||
There's also the 3rdparty repository
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
set -e
|
||||
|
||||
# parse arguments
|
||||
cre_args=(--workdir "/startdir" -v "$PWD":/startdir --rm)
|
||||
cre_args=(--workdir "/startdir" -v "$PWD":/startdir)
|
||||
[[ $DEBUG ]] || script_args+=(--rm)
|
||||
script_args= read_script_args= no_sync=
|
||||
for arg in "$@"; do
|
||||
if [[ $read_script_args ]]; then
|
||||
|
@ -26,9 +27,4 @@ if ! [[ $no_sync ]]; then
|
|||
script_sync=$(cat "$bindir/containersync")
|
||||
fi
|
||||
|
||||
# allow one to prevent the container from stopping via DEBUG variable
|
||||
if [[ $DEBUG ]]; then
|
||||
script_args+=' ; sleep infinity'
|
||||
fi
|
||||
|
||||
${CRE:-docker} run "${cre_args[@]}" "${CRE_IMAGE:-archlinux-base-devel}" bash -c "$script_sync $script $script_args"
|
||||
|
|
Loading…
Reference in New Issue