Skip to content

Instantly share code, notes, and snippets.

@pccr10001
Last active May 23, 2021 08:57
Show Gist options
  • Save pccr10001/a1943101bf681f325ae45be20989c046 to your computer and use it in GitHub Desktop.
Save pccr10001/a1943101bf681f325ae45be20989c046 to your computer and use it in GitHub Desktop.
#!/bin/bash
# use curl https://gist.github.com/pccr10001/a1943101bf681f325ae45be20989c046/raw/bd434624501739077a3d7cd4d91cce3bc9c52efd/install_docker.sh | sh -
CURRENT_USER=`whoami`
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common \
jq
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"
sudo apt update
sudo apt-get install -y docker-ce
sudo usermod -a -G docker $CURRENT_USER
curl -sL https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url' | grep -e $(uname -s)-$(uname -m)$ | sudo wget -i - -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