Skip to content

Instantly share code, notes, and snippets.

@linuxbiekaisar
Last active March 30, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linuxbiekaisar/ed36f7993381e76be7f1ef57b8d68dde to your computer and use it in GitHub Desktop.
Save linuxbiekaisar/ed36f7993381e76be7f1ef57b8d68dde to your computer and use it in GitHub Desktop.
How to install Docker in Ubuntu 18.04 LTS
# Youtube: https://www.youtube.com/watch?v=n55rKz4lCg4&t=11s
#!/bin/sh
# Update the apt package index:
$ sudo apt-get update
# Install packages to allow apt to use a repository over HTTPS:
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Verify that you now have the key with the fingerprint
$ sudo apt-key fingerprint 0EBFCD88
# Use the following command to set up the stable repository.
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# Update the apt package index.
$ sudo apt-get update
# Install the latest version of Docker Engine
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
# Check docker version
$ sudo docker -v
# Verify that Docker Engine - Community is installed correctly by running the hello-world image.
$ sudo docker run hello-world
$ sudo docker images
$ sudo docker ps -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment