Created
July 19, 2020 10:27
-
-
Save zlocate/fcf4116763525c23512a3944e62f2643 to your computer and use it in GitHub Desktop.
Install Docker-ce on Ubuntu\Debian-like distro
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 | |
| INSTALL_PACKAGES="docker-ce docker-ce-cli containerd.io" | |
| REMOVE_PACKAGES="docker docker-engine docker.io containerd runc" | |
| # Clean up installed packages | |
| sudo apt-get remove "$REMOVE_PACKAGES" | |
| # Install dependencies | |
| sudo apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg-agent \ | |
| software-properties-common | |
| # Installing apt repository key | |
| curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
| # Add docker repo | |
| sudo add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/debian \ | |
| $(lsb_release -cs) \ | |
| stable" | |
| sudo apt-get update | |
| # Install docker and misc | |
| sudo apt-get install -y "$INSTALL_PACKAGES" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment