diff --git a/diskimage_builder/elements/containerfile/README.rst b/diskimage_builder/elements/containerfile/README.rst index 093eee5a3..6f7b950a2 100644 --- a/diskimage_builder/elements/containerfile/README.rst +++ b/diskimage_builder/elements/containerfile/README.rst @@ -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 (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`` diff --git a/diskimage_builder/elements/containerfile/root.d/08-containerfile b/diskimage_builder/elements/containerfile/root.d/08-containerfile index d8ac82876..5f40b9e4c 100755 --- a/diskimage_builder/elements/containerfile/root.d/08-containerfile +++ b/diskimage_builder/elements/containerfile/root.d/08-containerfile @@ -93,7 +93,7 @@ function podman_cleanup() { 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 # NOTE(ianw) 2021-11-10 the tar must always be sudo to write out the chroot files # as other uids