Skip to content

Instantly share code, notes, and snippets.

@MrAmbiG
Created December 31, 2018 21:27
Show Gist options
  • Save MrAmbiG/3dc26e5f909d5cf954c702738802008c to your computer and use it in GitHub Desktop.
Save MrAmbiG/3dc26e5f909d5cf954c702738802008c to your computer and use it in GitHub Desktop.
This should install docker and docker-compose on ubuntu. Tested on ubuntu 18.04 (with mate desktop).
#!/bin/bash
: '
This should install docker and docker-compose on ubuntu.
Tested on ubuntu 18.04 (with mate desktop).
'
sudo apt update -y
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
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 bionic stable"
sudo apt update -y
apt-cache policy docker-ce
sudo apt install docker-ce -y
sudo systemctl status docker
# execute docker command without sudo
sudo usermod -aG docker ${USER}
su - ${USER}
# docker compose
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo 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