Skip to content

Commit

Permalink
add manual installation for docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Oehrli committed Jan 14, 2021
1 parent abb5ad8 commit 4bd66db
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/guacamole_init.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ exec 2>&1 # Redirect standard error to standard out
# - Main --------------------------------------------------------------------
echo "INFO: Start to initialize the guacamole stack at $(date)"

# get latest release of docker-compose
if ! command -v docker-compose &> /dev/null; then
DOCKER_COMPOSE_URL=$(curl -sL https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url'|grep -E "$(uname -s)-$(uname -m)$")
DOCKER_COMPOSE_RELEASE=$(echo $DOCKER_COMPOSE_URL|sed -e 's/.*\([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\).*/\1/')
curl -L "$DOCKER_COMPOSE_URL" -o /usr/local/bin/docker-compose
curl -L "https://raw.githubusercontent.com/docker/compose/$DOCKER_COMPOSE_RELEASE/contrib/completion/bash/docker-compose" -o /etc/bash_completion.d/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /bin/docker-compose
docker-compose --version
fi

# fix permisions
echo "INFO: Change permissions for /home/$GUACAMOLE_USER to $GUACAMOLE_USER"
chown -R $GUACAMOLE_USER:$GUACAMOLE_USER /home/$GUACAMOLE_USER
Expand Down

0 comments on commit 4bd66db

Please sign in to comment.