Posted on 2 mins read


Just like any other package you can install Docker on Manjaro with the packman package manager. Manjaro is based on Arch and the repositories are the same as Arch but with a delay.

sudo pacman -S docker

Now if it hasn’t happened automatically, you need to add your user to the Docker group if you want to avoid having to be root or use sudo when using Docker.

sudo usermod  -aG docker samy

You will have to start a new session for changes to take place.(logout)

Troubleshooting problems

The installation will probably finish without issues but when you try to use Docker by pulling an image or running a container you might get some errors like I did.

In my case I simply tried to get the Nginx container.

docker pull nginx

This produced a very common error: Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Now look at the logs for Docker.

sudo journalctl -u Docker

In my case the errors I was getting were “no overlay driver” and “no graphing”.

dockerd[32676]: Error starting daemon: error initializing graphdriver: loopback
dockerd[32590]: time="2017-04-16T21:52:20.146728036+02:00" level=error msg="'overlay...”
docker.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Docker Application Container Engine.
systemd[1]: docker.service: Unit entered failed state.
systemd[1]: docker.service: Failed with result 'exit-code'.

The Solution

You will have to manually define the storage driver and graphic path option that is available to your system.

With Docker there are multiple ways to define startup options but the recommended way is to create a JSON file in /etc/docker/daemon.json with the options defined in there in JSON-format.

        "graph": "/mnt/docker-data",
        "storage-driver": "overlay2"

Now start the Docker daemon

sudo systemctl start docker

Please don’t hesitate to ask questions below or to post suggestions and alternatives.