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.

Solution: 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.

docker-compose error could not find docker Docker Technology published

Was this page helpful?

Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback



© 2020 - ErnesTech - Privacy