Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
one script to install docker-ce and docker-compose on ubuntu 14
sudo apt-get update
sudo apt-get install -y \
linux-image-extra-$(uname -r) \
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
curl -fsSL | sudo apt-key add -
# Fail if the key doesn't match
sudo apt-key fingerprint 0EBFCD88 | grep '9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88'
if [ $? -ne 0 ]; then
echo "Key fingerprint doesn't match. See:"
exit 1
sudo add-apt-repository \
"deb [arch=amd64] \
$(lsb_release -cs) \
sudo apt-get update
sudo apt-get install -y docker-ce
sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo groupadd docker
sudo usermod -a -G docker ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment