This repository was archived by the owner on Feb 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ full_custom_readme: |
7878 up
7979 ```
8080 You can replace the last line with any docker-compose command and argument, which will be passed to docker-compose inside the image.
81-
81+
8282 ### Recommended method
83-
83+
8484 We provide a very convenient script that allows the docker-compose container to run as if it was installed natively:
8585 ```
8686 sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-docker-compose/master/run.sh -o /usr/local/bin/docker-compose
@@ -131,6 +131,7 @@ full_custom_readme: |
131131
132132 ## Versions
133133
134+ * **04.10.20:** - Update run.sh with changes from upstream.
134135 * **31.08.20:** - Update tox and virtualenv.
135136 * **31.07.20:** - Add support for global env var `DOCKER_COMPOSE_IMAGE_TAG` in the `run.sh` script.
136137 * **06.07.20:** - Publish docker-compose and docker-cli binaries in Github releases.
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ IMAGE="linuxserver/docker-compose:$DOCKER_COMPOSE_IMAGE_TAG"
2626
2727# Setup options for connecting to docker host
2828if [ -z " $DOCKER_HOST " ]; then
29- DOCKER_HOST=" / var/run/docker.sock"
29+ DOCKER_HOST=' unix:/// var/run/docker.sock'
3030fi
31- if [ -S " $DOCKER_HOST " ]; then
32- DOCKER_ADDR=" -v $DOCKER_HOST : $ DOCKER_HOST -e DOCKER_HOST"
31+ if [ -S " ${ DOCKER_HOST# unix :// } " ]; then
32+ DOCKER_ADDR=" -v ${ DOCKER_HOST# unix :// } : ${ DOCKER_HOST# unix :// } -e DOCKER_HOST"
3333else
3434 DOCKER_ADDR=" -e DOCKER_HOST -e DOCKER_TLS_VERIFY -e DOCKER_CERT_PATH"
3535fi
@@ -41,7 +41,13 @@ if [ "$(pwd)" != '/' ]; then
4141fi
4242if [ -n " $COMPOSE_FILE " ]; then
4343 COMPOSE_OPTIONS=" $COMPOSE_OPTIONS -e COMPOSE_FILE=$COMPOSE_FILE "
44- compose_dir=$( realpath " $( dirname " $COMPOSE_FILE " ) " )
44+ compose_dir=" $( dirname " $COMPOSE_FILE " ) "
45+ # canonicalize dir, do not use realpath or readlink -f
46+ # since they are not available in some systems (e.g. macOS).
47+ compose_dir=" $( cd " $compose_dir " && pwd) "
48+ fi
49+ if [ -n " $COMPOSE_PROJECT_NAME " ]; then
50+ COMPOSE_OPTIONS=" -e COMPOSE_PROJECT_NAME $COMPOSE_OPTIONS "
4551fi
4652# TODO: also check --file argument
4753if [ -n " $compose_dir " ]; then
You can’t perform that action at this time.
0 commit comments