Docker Daemon not booting

Hello,

Today I tried to use Docker Compose to run a program, although when running docker-compose up -d I get the error

ERROR: Couldn’t connect to Docker daemon at http+docker://localhost - is it running?

If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

I’ve done some digging on the internet and figured out that it was obviously a Docker daemon problem. So I ran the command sudo dockerd. It seemed that everything was going well until the end of the output of the command which was

failed to start daemon: error initializing graphdriver: failed to make /var/lib/docker/btrfs a mount: mount /var/lib/docker/btrfs:/var/lib/docker/btrfs, flags: 0x1000: permission denied

I’ve tried reaserching on how to fix this, although there have been no results so far. Thanks for reading.

What OS is it installed on?

The docker container is running on Ubuntu 20.04.

Does it start if your using root as the user?

Nope, still the same failed to start daemon: … error as the original post.

Did you check the prerequisites for btrfs?

The default storage driver is overlay2. Do you really want to use btrfs?

Also make sure that you are installing Docker on a phisycal host or in a virtual machine and not in a WSL 1 distribution. If you have an Ubuntu WSL distribution on Windows, use WSL2 not WSL1.