Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose not running from terminal #720

Closed
xicubed opened this issue Sep 28, 2016 · 10 comments
Closed

docker-compose not running from terminal #720

xicubed opened this issue Sep 28, 2016 · 10 comments

Comments

@xicubed
Copy link

xicubed commented Sep 28, 2016

Expected behavior

MY-MACHINENAME:~ myusername$ docker-compose
Define and run multi-container applications with Docker.

Usage:
  docker-compose [-f <arg>...] [options] [COMMAND] [ARGS...]
  docker-compose -h|--help
...

Actual behavior

MY-MACHINENAME:~ myusername$ docker-compose

-bash: docker-compose: command not found

Information

Docker for Mac: version: 1.12.1 (2d5b4d9)
OS X: version 10.12 (build: 16A323)
logs: /tmp/E96DFE3B-96B7-4C8E-88E3-D6FA982001AE/20160928-170618.tar.gz
[OK]     docker-cli
[OK]     virtualization kern.hv_support
[OK]     menubar
[OK]     moby-syslog
[OK]     dns
[OK]     disk
[OK]     system
[OK]     app
[OK]     osxfs
[OK]     virtualization VT-X
[OK]     db
[OK]     slirp
[OK]     logs
[OK]     env
[OK]     vmnetd
[OK]     moby-console
[OK]     moby
[OK]     driver.amd64-linux

Steps to reproduce the behavior

  1. Install Docker for Mac: version: 1.12.1 (2d5b4d9)
  2. Apply fix for issue Cannot connect to the Docker daemon. Is the docker daemon running on this host? #47
  3. Try run docker-compose from terminal
@dsheets
Copy link
Contributor

dsheets commented Sep 29, 2016

Did you have a previous version of Docker for Mac installed? Did you upgrade to 1.12.1? Beta 26/1.12.1 should have fixed the underlying issue in #47 which resulted in incorrect socket linking and installation location.

@xicubed
Copy link
Author

xicubed commented Sep 29, 2016

I may have had a previous version on at some point but I don't think it was installed when I loaded 1.12.1. It would have been pre Sierra.

Just now I uninstalled again, and reinstalled the beta channel and that put 1.12.2-rc1-beta27 (179c18xc) on my machine but it still got the failure (and the docker-compose missing):

docker ps failed: Failure("docker ps: timeout after 10.00s")
[ERROR]  docker-cli
         /var/run/docker.sock does not exist
         Unexpected error (No such file or directory) connecting to /var/run/docker.sock
         docker ps failed

Other notes. I have Xcode loaded. I also have my home directory on a removable drive.

@xicubed
Copy link
Author

xicubed commented Sep 30, 2016

I installed everything on a fresh computer and everything worked. So maybe something with a previous install or my non-standard user profile location...

@xicubed
Copy link
Author

xicubed commented Sep 30, 2016

One thing in comparing the two installs, on the working machine i have docker, docker-compose and docker-machine in /usr/local/bin. On the malfunctioning device I only have docker in /usr/local/bin.

@xicubed
Copy link
Author

xicubed commented Sep 30, 2016

To fix for now for myself running...

ln -s /Applications/Docker.app/Contents/Resources/bin/docker-compose /usr/local/bin/docker-compose
and
ln -s /Applications/Docker.app/Contents/Resources/bin/docker-machine /usr/local/bin/docker-machine

@xicubed
Copy link
Author

xicubed commented Sep 30, 2016

resulting in....

lrwxr-xr-x    1 myusername  308826735        91 Sep 29 15:35 docker -> /Volumes/SamsungSSD/Users/myusername/Library/Group Containers/group.com.docker/bin/docker
lrwxr-xr-x    1 myusername  admin            62 Sep 30 09:32 docker-compose -> /Applications/Docker.app/Contents/Resources/bin/docker-compose
lrwxr-xr-x    1 myusername  admin            62 Sep 30 09:33 docker-machine -> /Applications/Docker.app/Contents/Resources/bin/docker-machine

@tgorgdotcom
Copy link

tgorgdotcom commented Sep 30, 2016

Hello, just wanted to chime in and mention that I was having the same issue. docker.sock, docker-machine, and docker-compose were not properly symlinked.

I'm running macOS Sierra and tried both 1.12.1 as well as the latest beta versions 1.12.2-rc1-beta26 and 1.12.2-rc1-beta27. I don't know if this is helpful, but my user folder is on a usb drive instead of the normal users folder.

@samoht
Copy link
Contributor

samoht commented Oct 12, 2016

The missing symlinks is a known issue that we are tracking in #785, so closing.

@samoht samoht closed this as completed Oct 12, 2016
@xicubed
Copy link
Author

xicubed commented Nov 30, 2016

@samoht @tgorgolione @dsheets Interesting... I was still having this issue. I was seeing how to make the symbolic links permanent when I stumbled across this note from http://apple.stackexchange.com/questions/115646/how-can-i-create-a-symbolic-link-in-terminal saying that:

To create a symlink to replace a system directory (e.g. if you want to have /Users pointing to another disk drive), you need to disable System Integrity Protection. You can re-enable it after the symlink is set up.

Once I disabled System Integrity Protection and did a factory reset on Docker (1.13.0-rc2-beta31) everything seemed to work! I'm not 100% sure that a factory reset would have fixed it before the

csrutil disable

from safe mode but I think this was the issue. Might want to verify/document/and add this info to some other bugs like #47...

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants