I installed docker-machine 0.1.0 and docker-compose 1.1.0 on Mac OS 10.8.5.
Docker-machine is running normally and able to connect by docker-machine ssh.
Apart from adding users to docker group, to avoid typing sudo
repetitively, you can also create an alias for docker
commands like so:
alias docker-compose="sudo docker-compose"
alias docker="sudo docker"
if you are using docker-machine then you have to activate the environment using env variable. incase you are not using docker-machine then run your commands with sudo
WORKING!!
I tried with below commands and its working
service docker restart
docker-compose -f docker_compose.yaml down
docker-compose -f docker_compose.yaml up
sudo systemctl start docker
- to start the Docker service.
sudo docker-compose up
after that.
I have Fedora 26, and trying to solve the same issue I eventually entered Docker Compose on Fedora Developers' page and then Docker on Fedora Developers' page, which helped me.
Probably, docker service considered by community to start with the system and run in background all the time, but for me it was not so obvious, and that's the reason I can think of why there's no popular answer like this one.
On the Fedora Developers' page there's instruction how to enable Docker to start with the system:
sudo systemctl enable docker
If you are on Linux you may not have docker-machine
installed since it is only installed by default on Windows and Mac computers.
If so you will need to got to: https://docs.docker.com/machine/install-machine/ to find instructions for how to install it on your version of Linux.
After installing, retry running docker-compose up
before trying anything listed above.
Hope this helps someone. This worked for my devilbox installation in Fedora 25.
logging out then in again helped me. In my case it was fresh install, I created a new user, new group then added the user to the docker group.
exit exit
then ssh into the server again