docker Error

Resolving Couldn't connect to Docker daemon Error

Shou Arisaka
1 min read
Nov 17, 2025

While doing Quickstart: Compose and Rails, when executing the docker-compose run web rails new . —force —database=postgresql command,

ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running? If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

I struggled thinking it was a version or conflict issue with docker-compose or docker, but I solved it so here’s a memo.

Cause

Because sudo is attached

Solution

# Add user to docker group
usermod -aG docker ${USER}

# Restart
exit

# Verify
docker images

Reference: https://github.com/docker/compose/issues/1214

Share this article

Shou Arisaka Nov 17, 2025

🔗 Copy Links