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

Error starting docker compose #407

Closed
MPP-SG opened this issue Sep 16, 2020 · 2 comments · Fixed by #464
Closed

Error starting docker compose #407

MPP-SG opened this issue Sep 16, 2020 · 2 comments · Fixed by #464

Comments

@MPP-SG
Copy link

MPP-SG commented Sep 16, 2020

General information

version of ShellHub): 0.4.0 (ShellHub is running on localhost in a docker-compose container
Mac OSX: 10.14.6 (macOS Mojave)

Problem description

The command ./bin/docker-compose up -d is not working and produces following output in my terminal:
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './docker-compose.yml'

Problem story

  1. I created a fresh folder on my drive and cloned the new version of ShellHub via git clone -b v0.4.0 https://github.com/shellhub-io/shellhub.git shellhub
  2. cd shellhub and ./bin/keygen worked fine without any problems
  3. After ./bin/docker-compose up -d I got the error

Suggestions

I think the pointer to the docker compose file is missing a dot. Within the shell script it should create the file path ../docker-compose.yml

Side node

When starting docker compose with the command docker-compose up -d, then everything gets downloaded and installed as expected

@gustavosbarreto
Copy link
Member

General information

version of ShellHub): 0.4.0 (ShellHub is running on localhost in a docker-compose container
Mac OSX: 10.14.6 (macOS Mojave)

ShellHub is not supposed to work on MacOSX because none of our contributors has a Apple workstation.

readlink: illegal option -- f

It seems that the readlink command from MacOSX does not support the -f flag.

Is there any alternative to readlink command to work on Mac as it works on Linux (coreutils)?

@MPP-SG
Copy link
Author

MPP-SG commented Sep 16, 2020

I just googled a bit around and found a question about that on stackoverflow: https://stackoverflow.com/a/4031502

I tested this on my Mac with greadlink -f name, where name could be a filename or folder name and it worked as expected. The command gave me the absolut path to the given name

From stackoverflow

MacPorts and Homebrew provide a coreutils package containing greadlink (GNU readlink). Credit to Michael Kallweitt post in mackb.com.
brew install coreutils
greadlink -f file.txt

gustavosbarreto added a commit that referenced this issue Sep 30, 2020
This commit replaces PR #409. Closes #407
gustavosbarreto added a commit that referenced this issue Sep 30, 2020
This commit replaces PR #409. Closes #407
otavio pushed a commit that referenced this issue Sep 30, 2020
This commit replaces PR #409. Closes #407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants