Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
install_docker.sh for Ubuntu 16.04 Xenial
#!/bin/bash
# 2017/03/31 see follwing URL
# - https://docs.openstack.org/admin-guide/support-compute.html
ls /etc/.docker-ce
if [ $? -eq 0 ]; then
exit 0
fi
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
apt-get update
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get install -y \
docker-ce
apt-get update
apt-get install -y \
docker-compose
touch /etc/.docker-ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment