| autopkgtest-build-docker(1) | General Commands Manual | autopkgtest-build-docker(1) |
autopkgtest-build-docker, autopkgtest-build-podman - Create or update autopkgtest image for autopkgtest-virt-docker, autopkgtest-virt-podman
autopkgtest-build-docker [options] [-- extra docker-build args...]
autopkgtest-build-podman [options] [-- extra podman-build args...]
autopkgtest-build-docker creates or updates a Docker or Podman image which is suitable for autopkgtest's Docker/Podman runner autopkgtest-virt-docker(1) or autopkgtest-virt-podman(1).
When run as autopkgtest-virt-podman or with the --podman option (recommended), Podman is used for building images. This can be done unprivileged.
When run as autopkgtest-virt-docker or with the --docker option, Docker is used. This requires root-equivalent privileges on the host system. Using Podman instead of Docker is recommended.
The images produced by this tool are intended to be suitable for use with either Podman or Docker.
The image used for testing is built using docker-build(1) or podman-build(1) from a base image or tarball, using a recipe that adds deb-src apt sources, runs apt-get update and installs build dependencies.
If the --tarball option is used, the image used for testing is based on that tarball, and no base image is downloaded.
Otherwise, it is based on a pre-existing base image. The default is to download a suitable base image for the detected or configured OS vendor from a third-party container registry. The --image option can be used to select a different base image.
You can specify an apt proxy to use in the container in the --apt-proxy parameter. If you have an apt proxy configured on the host, the container will automatically use this, otherwise there is no default.
You can pass additional options to Docker or Podman: any positional arguments, or any arguments at all after a --, get passed verbatim to docker-build(1) or podman-build(1).
It is recommended that you always use a -- to distinguish these arguments, for readability.
If the $AUTOPKGTEST_KEEP_APT_SOURCES environment variable is set to a non-empty value, autopkgtest-build-docker will keep whatever /etc/apt/sources.list was inherited from the base image.
Otherwise, if the $AUTOPKGTEST_APT_SOURCES_FILE environment variable is set to a non-empty value, for example AUTOPKGTEST_APT_SOURCES_FILE=/home/me/mydistro/sources.list, then autopkgtest-build-docker will read that file (on the host system) and use it to populate /etc/apt/sources.list in the virtual machine; or if the $AUTOPKGTEST_APT_SOURCES environment variable is set to a non-empty value, for example AUTOPKGTEST_APT_SOURCES=$(cat /home/me/mydistro/sources.list), autopkgtest-build-docker will write it directly into /etc/apt/sources.list in the resulting container image.
When $AUTOPKGTEST_APT_SOURCES_FILE or $AUTOPKGTEST_APT_SOURCES contain sources in the deb822 format, then sources are written to /etc/apt/sources.list.d/<distro>.sources in the container, rather than /etc/apt/sources.list.
You can specify an apt proxy to configure in the container image in the $AUTOPKGTEST_APT_PROXY environment variable. If you have an apt proxy configured on the host, the container will automatically use this, otherwise there is no default.
A container image named autopkgtest/debian:sid, suitable for testing packages that target Debian unstable (sid), can be based on the images available from docker.io:
$ autopkgtest-build-podman --image debian:sid --post-command "apt-get update && apt-get install some-package"
or can be built locally from a minbase tarball generated by mmdebstrap(1):
$ mmdebstrap --variant=minbase sid - | autopkgtest-build-podman --release=sid --tarball=-
podman(1), docker(1), containers-registries.conf(5), autopkgtest-virt-docker(1), autopkgtest(1), /usr/share/doc/autopkgtest/
autopkgtest-build-docker was written by Iñaki Malerba <inaki@malerba.space>
This manpage is part of autopkgtest, a tool for testing Debian binary packages. autopkgtest is Copyright (C) 2006-2014 Canonical Ltd and others.
See /usr/share/doc/autopkgtest/CREDITS for the list of contributors and full copying conditions.
| 2018 | Linux Programmer's Manual |