Last active
June 15, 2016 10:00
-
-
Save allbinmani/d4b18b6c956ee19178c23d8c4dcc570a to your computer and use it in GitHub Desktop.
bash script to set up a new debian 8.2 with docker and docker-compose
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 | |
if [ -z $COMPOSE_VERSION ]; then | |
#1.8.0-rc1 exists | |
COMPOSE_VERSION=1.7.0 | |
fi | |
if [ `whoami` = "root" ]; then | |
echo "Do not run as root!" | |
exit 2 | |
fi | |
sudo apt-get update -yq | |
sudo apt-get install apt-transport-https ca-certificates -yq | |
sudo apt-get upgrade -yq | |
sudo apt-get install curl -yq | |
# docker | |
curl -sSL https://get.docker.com/ | sh | |
sudo usermod -aG docker `whoami` | |
# docker-compose | |
sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` | |
sudo chmod +x /usr/local/bin/docker-compose | |
# set timezone | |
sudo timedatectl set-timezone Europe/Stockholm | |
# nice to have nslookup.. | |
sudo apt-get install dnsutils -yqq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment