Last active
July 2, 2023 16:33
-
-
Save figassis/0f06875a1ac2630bcd4703d8216d60d2 to your computer and use it in GitHub Desktop.
Install docker on ubuntu
This file contains hidden or 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
#!/bin/bash | |
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common | |
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-get update && sudo apt-get -y install docker-ce ufw git | |
sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo adduser --disabled-password --gecos "" ubuntu | |
sudo usermod -aG docker ubuntu | |
sudo usermod -aG sudo ubuntu | |
echo "ubuntu ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ubuntu | |
cp -R ~/.ssh /home/ubuntu/.ssh && chown -R ubuntu:ubuntu /home/ubuntu/.ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment