Skip to content

Instantly share code, notes, and snippets.

@lucassrg
Created March 28, 2022 14:44
Show Gist options
  • Save lucassrg/6d27b252d5c7f9db4c01eb93aa8cec2d to your computer and use it in GitHub Desktop.
Save lucassrg/6d27b252d5c7f9db4c01eb93aa8cec2d to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu 18.04

9 Steps to install Docker on Ubuntu 18.04

1.Remove any Docker files that are running in the system, using the following command:

sudo apt-get remove docker docker-engine docker.io

2. Check if the system is up-to-date:

sudo apt-get update

3. Install Docker

sudo apt install docker.io

4. Install all the dependency packages

sudo snap install docker

5. Before testing Docker, check the version installed

docker --version

6. Pull an image from the Docker hub

sudo docker run hello-world

7. Check if the docker image has been pulled and is present in your system

sudo docker images

8. Display all the containers pulled

sudo docker ps -a

9. Check for containers in a running state

sudo docker ps

Source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment