12.9 C
Texas

How To Install Docker on Ubuntu 16.04 18.04 / 19.04

Today we are going to learn you that how you can Install Docker engine on your Ubuntu system. Docker engine allows you to package your applications with all of its dependencies into a single standardized unit for software development & distribution.
It is an open source Linux Distribution which wrap up a piece of software in complete file system that contain everything it needs to run like:

  • code
  • runtime
  • system tools
  • system libraries

And much more you can Install on a Linux server. The main specification of Docker is that it can work in any Environment.

Lets proceed with the Installation process.

Step 1: Update your System

Make sure that your system is up-to date.

- Advertisement -
sudo apt -y update

Step 2: Install Basic Dependencies

We need few dependencies for our actual Installation of Docker, so we will configure these. Install them by running the given command in your Terminal.

sudo apt -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Step 3: Installing Docker CE on Ubuntu 16.04 / 18.04 / 19.04

If you’re using any previous version of Docker remove them.

sudo apt remove docker docker-engine docker.io containerd runc

Now, import GPG key.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

After it, add Docker CE repository to Ubuntu.

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Final step is to Install Docker CE on Ubuntu 16.04 / 18.04 /19.04

sudo apt update
sudo apt -y install docker-ce docker-ce-cli containerd.io

Now, add your user account to docker group

sudo usermod -aG docker $user
newgrp docker

Check Docker Version to Verify your Installation.

$ docker version
Client: Docker Engine - Community
Version: 19.03.2
API version: 1.40
Go version: go1.12.8
Git commit: 6a30dfc
Built: Sun Nov 30 05:29:11 2019
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.2
API version: 1.40 (minimum version 1.12)
Go version: go1.12.8
Git commit: 6a30dfc
Built: Sun Nov 30 05:27:45 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683

Step 4: Install Docker Compose on Ubuntu

Congratulations! You’re all done.

Follow the below link to read :

How To Install Latest Docker Compose on Linux.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article