After centOS7.6 installs docker, execute it in the directory where the docker-compose.yml
file is located:
docker-compose up -d
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.
My solution is to start docker:
sudo systemctl start docker
If you can't solve it, you can try the following method
sudo gpasswd -a ${USER} docker
sudo docker-compose up