Created
April 7, 2020 15:23
-
-
Save afahitech/0b762c82223d9c5367fe05b43703e88e to your computer and use it in GitHub Desktop.
Docker install on ubuntu 18.04
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/sh | |
| # Install Prerequisite Packages | |
| sudo apt update && sudo apt upgrade | |
| sudo apt-get install curl apt-transport-https ca-certificates 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 update | |
| # Installing Docker | |
| sudo apt install docker-ce | |
| sudo systemctl status docker | |
| # Executing the Docker Command Without Sudo | |
| sudo usermod -aG docker ${USER} | |
| su - ${USER} | |
| id -nG | |
| sudo usermod -aG docker ataur | |
| #Using the Docker Command | |
| docker [option] [command] [arguments] | |
| docker | |
| docker docker-subcommand --help | |
| docker info | |
| docker --version | |
| #Working with Docker Images | |
| docker run hello-world | |
| docker search ubuntu | |
| docker pull ubuntu | |
| docker images | |
| docker image ls | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment