Last active
August 29, 2015 14:26
-
-
Save shiena/e57603181b191fe58405 to your computer and use it in GitHub Desktop.
/var/lib/boot2docker/
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 | |
VERSION=1.3.3 | |
VAR_COMPOSE=/var/lib/boot2docker/docker-compose | |
BIN_COMPOSE=/usr/local/bin/docker-compose | |
boot2docker ssh "sudo curl -L -o ${VAR_COMPOSE} https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-Linux-x86_64" | |
boot2docker ssh "sudo chmod +x ${VAR_COMPOSE}" | |
boot2docker ssh "sudo ln -fs ${VAR_COMPOSE} ${BIN_COMPOSE}" | |
boot2docker ssh "cat << EOL > bootlocal.sh | |
#!/bin/sh | |
if [ -x ${VAR_COMPOSE} -a ! -e ${BIN_COMPOSE} ]; then | |
ln -s ${VAR_COMPOSE} ${BIN_COMPOSE} | |
fi | |
EOL | |
" | |
boot2docker ssh "sudo cp bootlocal.sh /var/lib/boot2docker/" | |
boot2docker ssh "rm -f bootlocal.sh" | |
if ! `grep -qE 'alias +docker-compose=' ~/.bash_profile`; then | |
echo "alias docker-compose='boot2docker ssh -t \"docker-compose \$@\"'" >> ~/.bash_profile | |
fi |
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 | |
VERSION=1.3.3 | |
VAR_COMPOSE=/var/lib/boot2docker/docker-compose | |
BIN_COMPOSE=/usr/local/bin/docker-compose | |
if [ ! -e ${VAR_COMPOSE} ]; then | |
curl -L -o ${VAR_COMPOSE} https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) | |
if [ ${?} -eq 0 -a -f ${VAR_COMPOSE} ]; then | |
chmod +x ${VAR_COMPOSE} | |
fi | |
fi | |
if [ -x ${VAR_COMPOSE} -a ! -e ${BIN_COMPOSE} ]; then | |
ln -s ${VAR_COMPOSE} ${BIN_COMPOSE} | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment