Skip to content

Instantly share code, notes, and snippets.

@nazarii-piontko
Last active May 30, 2022 06:15
Show Gist options
  • Save nazarii-piontko/c5508cf5dc4ead8f053c938c9ca6eda0 to your computer and use it in GitHub Desktop.
Save nazarii-piontko/c5508cf5dc4ead8f053c938c9ca6eda0 to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu (16.04)
#!/bin/bash
# Installation script based on official documentation from https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1
apt-get update -y
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
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 -y
apt-get install -y docker-ce
# Install docker-compose additionally
curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment