autopkgtest-virt-docker(1)

NAME
autopkgtest-virt-docker, autopkgtest-virt-podman - autopkgtest virtualisation server using Docker/Podman

SYNOPSYS
autopkgtest-virt-docker [options] docker-image [-- extra docker-run args...] autopkgtest-virt-podman [options] podman-image [-- extra podman-run args...]

DESCRIPTION
autopkgtest-virt-docker provides an autopkgtest virtualization server using Docker or Podman. It adapts the functionality provided by the docker(1) or podman(1) command line for use by autopkgtest. Normally, autopkgtest-virt-docker will be invoked by autopkgtest.

REQUIREMENTS
When run as autopkgtest-virt-podman or with the --podman option (recommended), this autopkgtest virtualization server requires podman(1), from the podman package. Unprivileged access to user namespaces must be enabled (this is true by default in Debian 11 or later), and the current user must have at least 65536 subordinate user IDs allocated in /etc/subuid and 65536 subordinate group IDs in /etc/subgid. See /usr/share/doc/podman/README.Debian for more details. When run as autopkgtest-virt-docker or with the --docker option, this autopkgtest virtualization server requires docker(1), from the docker.io package. The current user must have access to the Docker daemon socket /run/docker.sock, unless the --sudo option is used. Note that either of these makes the user root-equivalent on the host system. Using Podman instead of Docker is recommended.

OPTIONS

--docker
    Use Docker containers and the Docker container manager. This is the default when invoked as autopkgtest-virt-docker.

--podman
    Use Podman containers and the Podman container manager. This is the default when invoked as autopkgtest-virt-podman.

-d | --debug
    Enables debugging output.

--init
    Launches the container by running /sbin/init as the initial command, instead of the default placeholder command sleep infinity. This will only work for images that contain an init system, such as those prepared by autopkgtest-build-podman --init=systemd. This option is unlikely to work when using Docker. The image will not be able to provide the isolation-container autopkgtest capability unless this option is used.

-p | --pull
    Pulls the specified image before setting up the container. By default the image is expected to already be present.

-s | --sudo
    Run Docker or Podman commands through sudo. For Podman, this is rarely useful, because Podman usually runs unprivileged. For Docker, use this option if you run autopkgtest as a normal user who does not have access to the docker daemon (i.e. is not a member of the docker group).

You can pass additional options to Docker or Podman: anything after a -- gets passed verbatim to docker-run(1) or podman-run(1).

INPUT, OUTPUT AND EXIT STATUS
The behaviour of autopkgtest-virt-docker is as described by the AutomatedTesting virtualisation regime specification.

NOTES
You can create an image suitable for autopkgtest from the semi-official Debian base images, like debian:unstable, or from the official Ubuntu base images, like ubuntu:bionic:
        autopkgtest-build-podman --image debian:sid
        autopkgtest hello_2.8-4.dsc -- podman autopkgtest_debian:sid
Alternatively, you can test a container that runs a base image directly. However, most images need apt-get update before apt will work, so calling autopkgtest with --setup-commands="apt-get update" will be needed:
        autopkgtest hello_2.8-4.dsc --setup-commands="apt-get update" -- podman debian:sid

EXAMPLE
You can use "(Semi) Official Debian base images" like debian:unstable, or "Official Ubuntu base images", like ubuntu:trusty. Run tests against hello_2.8-4.dsc, using the image debian:unstable:
        autopkgtest hello_2.8-4.dsc --setup-commands="apt-get update" -- podman debian:unstable

SEE ALSO
autopkgtest(1), docker-run(1), podman-run(1), /usr/share/doc/autopkgtest/.

AUTHORS AND COPYRIGHT
autopkgtest-virt-docker was written by Mathieu Parent <math.parent@gmail.com>. This manpage is part of autopkgtest, a tool for testing Debian binary packages. autopkgtest is Copyright (C) 2006-2015 Canonical Ltd and others. See /usr/share/doc/autopkgtest/CREDITS for the list of contributors and full copying conditions.