We support latest version of Docker on our vpsAdminOS servers.
Please keep in mind there is no compatibility with latest version on OpenVZ.
As there are not everytime latest packages in distribution repos, we recommend to instead use the docker.com ones. Installation of these can be done easily on:
Other distributions are not tested, but there is big chance they will be totally fine. Feel free to modify this page afterwise.
apt-get -y update apt-get -y install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" apt-get -y update apt-get -y install docker-ce
The upstream version of docker moby-engine can be installed directly from Fedora repositories:
dnf install -y moby-engine
It's necessary to configure the dockerd daemon to run with cgroupdriver=cgroupfs, otherwise you encounter the following problem:
$ docker run hello-world docker: Error response from daemon: OCI runtime create failed: cgroup v2 not enabled on this host, can't use systemd (rootless) as cgroups manager: unknown.
To configure the cgroup driver one needs to override the ExecStart for docker.service:
$ systemctl edit docker ExecStart=/usr/bin/dockerd \ --host=fd:// \ --exec-opt native.cgroupdriver=cgroupfs \ $OPTIONS
Checking that docker is running smoothly:
systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e Active: active (running) since Sun 2020-02-23 14:55:22 UTC; 9s ago Docs: https://docs.docker.com Main PID: 2893 (dockerd) Tasks: 30 CGroup: /system.slice/docker.service └─2893 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/contain
/sbin/modprobe, or modify
containerd.servicewith changes of value
mv /sbin/modprobe /sbin/modprobe.old && ln -s /bin/true /sbin/modprobe
Now we can try
docker run hello-world:
docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. [...]
Test of networking can be done with:
docker run -it alpine ping -c 3 vpsfree.cz
Docker-in-Docker does not work by itself, because Docker is trying to connect
/sys/kernel/security, which is not accessible in VPS because of kernel restriction.
BUT there is one-line hack for this, with volume in bind-mount:
docker run -v /sys/kernel/security:/sys/kernel/security ...
If any command result prints permission denied most likely its not enabled in AppArmor profile. We can fix this, but we really need to know way how to reproduce it and know your VPS ID. Come by to IRC #vpsfree / #vpsadminos or mail us on support.