Last active
February 25, 2019 05:09
-
-
Save alvin2ye/f48c7fe21c1f189b9b1b0f3b704d352e to your computer and use it in GitHub Desktop.
install_docker_on_ubuntu_1606.bash
This file contains hidden or 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/bash | |
# Must 64bit | |
uname -a | grep x86_64 || echo "must 64bit" || exit 0 | |
DOCKER_COMPOPSE_VERSION=1.23.2 | |
# install packages | |
apt-get update | |
apt-get install -y --no-install-recommends software-properties-common apt-transport-https ca-certificates curl | |
apt-get remove docker docker-engine docker.io | |
# install docker | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
apt-key fingerprint 0EBFCD88 | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
apt-get update | |
apt-get install -y docker-ce | |
echo "=====================" | |
docker --version | |
echo "---------------------" | |
# install docker-compose | |
curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/$DOCKER_COMPOPSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" | |
chmod +x /usr/local/bin/docker-compose | |
echo "=====================" | |
docker-compose -v | |
echo "---------------------" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment