Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 289bdc6

Browse files
author
Derek Murawsky
committed
Add environment var support for image version
Added support to define the version of the container to run via environment variables. Closes: #12
1 parent 155be4b commit 289bdc6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

run.sh

100644100755
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717

1818
set -e
1919

20-
VERSION="latest" # can be set to a specific version tag from docker hub, such as "1.25.5", or "alpine"
21-
IMAGE="linuxserver/docker-compose:$VERSION"
22-
20+
DOCKER_COMPOSE_CONTAINER_VERSION="${DOCKER_COMPOSE_CONTAINER_VERSION-latest}" # can be set to a specific version tag from docker hub, such as "1.25.5", or "alpine"
21+
IMAGE="linuxserver/docker-compose:$DOCKER_COMPOSE_CONTAINER_VERSION"
2322

2423
# Setup options for connecting to docker host
2524
if [ -z "$DOCKER_HOST" ]; then
@@ -68,4 +67,4 @@ if docker info --format '{{json .SecurityOptions}}' 2>/dev/null | grep -q 'name=
6867
fi
6968

7069
# shellcheck disable=SC2086
71-
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"
70+
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"

0 commit comments

Comments
 (0)