-
-
Save sumonst21/afe7689604c79bef3d8a2505a46902ce to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu 18.04 (without sudo mode docker cli setup)
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
#!/bin/bash | |
echo "Updating system..." | |
sudo apt update | |
echo "Installing dependencies..." | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
echo "Downloading data..." | |
sudo apt install -y curl | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
echo "Setting up system..." | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
sudo apt update | |
sudo apt install -y docker-ce | |
echo "Setting up docker run without sudo..." | |
sudo usermod -aG docker ${USER} | |
sudo service docker restart | |
su - ${USER} | |
echo "Docker install done!" | |
echo "Installing docker-compose" | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
echo "Installation completed!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment