Docker on Alpine Linux
β’ 123 words β’ 1 min β’ updated
β οΈ This post is over one year old. It may no longer be up to date or relevant. Opinions may have changed.
In this post: how to properly start docker on an Alpine Linux server.
First, install docker and friends:
shell
doas apk add docker docker-cli docker-composeThen start the docker service:
shell
doas service docker startCheck if it started successfully:
shell
service docker statusIf not, then look at the logs:
shell
less /var/log/docker.logI got an error:
failed to start daemon: error initializing graphdriver: driver not supportedThe suggestion was to change the driver to overlay2:
shell
% $EDITOR /etc/docker/daemon.json
{
"storage-driver": "overlay2"
}Then restart docker.
I got another error:
shell
level=error msg="failed to mount overlay: no such device" storage-driver=overlay2The suggestion was to reboot:
shell
doas rebootThen start docker again:
shell
doas service docker startAnd now everything works!