Docker is a platform to build Linux containers.
Installing Docker via XBPS
# xbps-install docker
Installing Docker Compose
Docker Compose is a tool to create and run multi-container Docker apps.
# xbps-install docker-compose
Starting the Docker daemon
Be sure to enable and start the service before trying to use it. If it is not enabled, it won't work.
# ln -s /etc/sv/docker /var/service/
For more documentation about using services, see for example runit.
Add your user to docker group
# sudo usermod -aG docker $USER
Command line interaction with Docker
For more information about Docker commands, please read the official documentation.
Docker seems to require systemd cgroups to be mounted on /sys/fs/cgroup/systemd.
You may get the following error while running docker:
$ docker: Error response from daemon: cgroups: cannot found cgroup mount destination: unknown.
To fix the error, create the directory, and mount systemd cgroups there:
# mkdir /sys/fs/cgroup/systemd # mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd