MacOS Sierra 10.12.2
Docker 1.12.5
New to Docker, this error appears every time I try to build a Docker file:
$ sudo docker build -t tutorial .
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
I followed the instructions from this SO post but the the problem wasn't solved: Docker can't connect to docker daemon
Docker version:
$ docker --version
Docker version 1.12.5, build ...
The directory:
$ ls
Dockerfile README.md apache supervisord
Start virtual machine for Docker:
$ docker-machine start
Starting "default"...
Machine "default" is already running.
...
$ docker-machine env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.00.00:2576" #edit
export DOCKER_CERT_PATH="/Users/myUser/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $(docker-machine env)
...
$ eval "$(docker-machine env default)"
Run it again:
$ sudo docker build -t tutorial .
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
SOLVED: does works without sudo
:
$ docker build -t tutorial .