Add c.gh.debarshiray.toolbox to containers and images from 'create'
Commit 0ab6eb7401
introduced the com.github.debarshiray.toolbox
label as a better way to identify toolbox containers and images. It
might be necessary to support creating toolbox containers from base
toolbox images that are not appropriately labeled. eg., this would
allow users to use newer versions of the toolbox script with older base
images to debug problems that are only seen in those versions of the
images.
While no change has been made, yet, to either enforce the presence or
override the absence of the com.github.debarshiray.toolbox label it is
prudent [1] to ensure that artifacts produced by 'toolbox create' are
adequately labeled regardless of what labels the input base image had.
[1] https://en.wikipedia.org/wiki/Robustness_principle
https://github.com/debarshiray/toolbox/pull/91
This commit is contained in:
parent
459763be82
commit
8127daa29e
1 changed files with 7 additions and 0 deletions
7
toolbox
7
toolbox
|
@ -262,6 +262,13 @@ configure_working_container()
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! $prefix_sudo buildah config \
|
||||||
|
--label "com.github.debarshiray.toolbox=true" \
|
||||||
|
"$working_container_name" >/dev/null 2>&3; then
|
||||||
|
echo "$base_toolbox_command: failed to add com.github.debarshiray.toolbox=true" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if ! $prefix_sudo buildah config --user "$USER" "$working_container_name" >/dev/null 2>&3; then
|
if ! $prefix_sudo buildah config --user "$USER" "$working_container_name" >/dev/null 2>&3; then
|
||||||
echo "$base_toolbox_command: failed to configure the default user as $USER" >&2
|
echo "$base_toolbox_command: failed to configure the default user as $USER" >&2
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in a new issue