tl;dr Using dockerd
, how do I select the v2
runtime?
docker run
warning suggests v2 runtimedocker
fails to run docker run hello-world
. The only warning is consider using runtime v2
found in file /var/log/deamon.log
containerd[367]: level=warning msg="runtime v1 is deprecated since containerd v1.4, consider using runtime v2" time="2020-12-30T15:49:25.426984959-08:00"
This is the only warning or error among all syslogs and --debug
output, so it's my best next step.
dockerd --help
options for runtime
are
‣ dockerd --help | grep runtime
--add-runtime runtime Register an additional OCI compatible runtime (default [])
--cpu-rt-runtime int Limit the CPU real-time runtime in microseconds
--default-runtime string Default OCI runtime for containers (default "runc")
Running Raspbian 9 (Debian 9) on Raspberry Pi 2.
Using docker-ce
installation (installed using get-docker.sh
)
‣ dpkg --status docker-ce
Package: docker-ce
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 68106
Architecture: armhf
Version: 5:19.03.14~3-0~raspbian-stretch
Replaces: docker-engine
Depends: docker-ce-cli, containerd.io (>= 1.2.2-3), iptables, libseccomp2 (>= 2.3.0), libc6 (>= 2.4), libdevmapper1.02.1 (>= 2:1.02.97), libsystemd0
Recommends: ca-certificates, cgroupfs-mount | cgroup-lite, git, pigz, xz-utils, libltdl7
Conflicts: docker (<< 1.5~), docker-engine, docker-engine-cs, docker.io, lxc-docker, lxc-docker-virtual-package
...
dockerd
‣ dockerd --version
Docker version 19.03.14, build 5eb3275d40
Docker version 19.03 did not allow you to select the v2 runtime.
Only Docker 20.10.0 introduced runtime v2 and uses it as its default runtime. For more details see Docker release notes at https://docs.docker.com/engine/release-notes/#runtime-5
The details of introducing runtime v2 to Docker 20.10.0 reveal that you should be able actively select the default runtime with Docker 20.10.0 upwards by specifying --default-runtime=com.docker.runtime.runc.v1
, see https://github.com/moby/moby/pull/41182.