Merge "allow passing arbitrary build options in containerfile element"

This commit is contained in:
Zuul 2024-04-12 16:17:20 +00:00 committed by Gerrit Code Review
commit 30a8948271
2 changed files with 3 additions and 1 deletions

View File

@ -22,3 +22,5 @@ Set ``DIB_CONTAINERFILE_RUNTIME_ROOT`` to ``1`` to run the runtime
Set ``DIB_CONTAINERFILE_NETWORK_DRIVER`` to a network driver of your choice Set ``DIB_CONTAINERFILE_NETWORK_DRIVER`` to a network driver of your choice
(e.g. host) to use it instead of the default bridge during build. (e.g. host) to use it instead of the default bridge during build.
Set ``DIB_CONTAINERFILE_BUILDOPTS`` to pass any other options to build command, e.g. ``--from docker.io/library/ubuntu:jammy --build-arg=HTTP_PROXY=http://10.20.30.2:1234``

View File

@ -93,7 +93,7 @@ function podman_cleanup() {
trap "podman_cleanup" EXIT trap "podman_cleanup" EXIT
${_sudo} ${DIB_CONTAINERFILE_RUNTIME} build ${DIB_CONTAINERFILE_RUNTIME_NETWORK} -t ${_podman_build_image} -f $DIB_CONTAINERFILE_DOCKERFILE $DIB_CONTAINER_CONTEXT ${_sudo} ${DIB_CONTAINERFILE_RUNTIME} build ${DIB_CONTAINERFILE_RUNTIME_NETWORK} -t ${_podman_build_image} -f $DIB_CONTAINERFILE_DOCKERFILE ${DIB_CONTAINERFILE_BUILDOPTS:-} $DIB_CONTAINER_CONTEXT
${_sudo} ${DIB_CONTAINERFILE_RUNTIME} run ${DIB_CONTAINERFILE_RUNTIME_NETWORK} --name ${_podman_export_container} -d ${_podman_build_image} /bin/sh ${_sudo} ${DIB_CONTAINERFILE_RUNTIME} run ${DIB_CONTAINERFILE_RUNTIME_NETWORK} --name ${_podman_export_container} -d ${_podman_build_image} /bin/sh
# NOTE(ianw) 2021-11-10 the tar must always be sudo to write out the chroot files # NOTE(ianw) 2021-11-10 the tar must always be sudo to write out the chroot files
# as other uids # as other uids