Last active
March 10, 2020 04:02
-
-
Save vinhjaxt/5dea059119ff50e7ed65f1cd74424579 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sudo sh get-docker.sh | |
# Install docker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
# Post installation | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
sudo usermod -aG docker $USER | |
# Logout and login, even reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
sudo rm -f /etc/apt/sources.list.d/docker.list | |
sudo apt update -y | |
# Install dependencies. | |
sudo apt install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg2 \ | |
software-properties-common | |
# Install docker | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
echo "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" | \ | |
sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt update -y | |
sudo apt install -y docker-ce docker-ce-cli containerd.io | |
# Run docker | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
# Add user to docker group for using docker without sudo command. | |
sudo gpasswd -a "${USER}" docker | |
# Install docker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
# Post installation | |
sudo usermod -aG docker $USER | |
# Logout and login, even reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment