Compose: Mac /usr/local/bin/docker-compose: line 39: realpath: command not found

Created on 23 Feb 2018  路  6Comments  路  Source: docker/compose

The docker-compose shell wrapper from 'run as a container' installation does not work on Mac as it is looking for the realpath command:

https://docs.docker.com/compose/install/#install-compose

sudo curl -L --fail https://github.com/docker/compose/releases/download/1.19.0/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

COMPOSE_FILE=docker/rancher-docker-compose.yml /usr/local/bin/docker-compose up

Docker for Mac's native binary version of docker-compose works normally.

compose-in-a-container kinquestion stale

All 6 comments

AFAIK readlink -f does the same job as realpath and is more widely available.

I used to use readlink a lot as a Linux systems engineer but the -f switch isn't available on Mac so it's not very portable:

readlink -f
readlink: illegal option -- f
usage: readlink [-n] [file ...]

Ah, I guess that only stands for Linux then :/

You should be able to install the GNU version of realpath using brew install coreutils (you might have to declare a realpath=grealpath alias).

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it had not recent activity during the stale period.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dazorni picture dazorni  路  3Comments

maltefiala picture maltefiala  路  3Comments

leiblix picture leiblix  路  3Comments

saulshanabrook picture saulshanabrook  路  3Comments

squeaky-pl picture squeaky-pl  路  3Comments