Home > Articles > Details

Docker-compose Error: ERROR: Couldn't connect to Docker daemon at http+docker [If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable]

Question: How do you resolve the docker-compose error:

 sudo docker-compose build
Building NameOfYourService
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.


Please Login to see the rest of the answer
Answer:
Make sure that in your docker-compose.yaml file the service name and the image name are all in small letters. Docker Compose does not like camel case naming of container, service, or image.
- Make sure that the appropriate permission is granted to the folder containing the application.

[NB] Make sure docker is running, check if docker service is running: sudo docker service status
[NB] If docker service is not running, start it: sudo docker service start
[NB] Then build your docker image using docker-compose.


If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy