-
-
Save bogdanRada/e5d0a7a3a649cbb363f0237e67b5169c to your computer and use it in GitHub Desktop.
Install docker-compose in boot2docker 1.7.0+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installation for VirtualBox: | |
docker-machine ssh <machine-name> < install-docker-compose.sh | |
Run docker-compose from the host: | |
docker-machine ssh <machine> -- docker-compose --version | |
Check that docker-compose is available after a reboot: | |
docker-machine reboot <machine> | |
docker-machine ssh <machine> -- docker-compose --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin.sh | |
DOCKER_COMPOSE_VERSION=1.3.0 | |
# Download docker-compose to the permanent storage | |
echo 'Downloading docker-compose to the permanent VM storage...' | |
sudo mkdir -p /var/lib/boot2docker/bin | |
sudo curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /var/lib/boot2docker/bin/docker-compose | |
sudo chmod +x /var/lib/boot2docker/bin/docker-compose | |
sudo ln -sf /var/lib/boot2docker/bin/docker-compose /usr/local/bin/docker-compose | |
# Making the symlink persistent via bootlocal.sh | |
echo 'Writing to bootlocal.sh to make docker-compose available on every boot...' | |
cat <<SCRIPT | sudo tee -a /var/lib/boot2docker/bootlocal.sh > /dev/null | |
# docker-compose | |
sudo ln -sf /var/lib/boot2docker/bin/docker-compose /usr/local/bin/docker-compose | |
SCRIPT | |
sudo chmod +x /var/lib/boot2docker/bootlocal.sh | |
echo 'Launching docker-compose...' | |
docker-compose --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works for me with
#!/usr/bin/env sh
:)cheers