Learn Docker

Source : esds.co.in

Hello gang! This time I will explain how to install docker on Ubuntu.

Previously, was the docker?

Docker is a platform built on container technology. Docker is an open-source project that provides an open platform for developers and sysadmins to be able to build, package and run applications anywhere as a lightweight container. With the very popular docker, some people often think docker is another name for containers. Source.

It’s easy like this,

Understand the meaning of the picture above? So, in one ship it can accommodate many containers in it, the concept is the same as the docker symbol. So, the docker can accommodate many applications, OS, and the like.

Immediately, I will tell you how to install it, follow the steps below

The first
The first we update the package first.

sudo apt update
After that, install some of the required packages

sudo apt install apt-transport-https ca-certificates curl software-properties-common
After all, add the GPG key

-fsSL curl https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
After that, add the Repository docker to APT source

sudo add-apt-repository “deb [arch = amd64] https://download.docker.com/linux/ubuntu bionic stable”
After that, it was updated to update the package or repo that we added to read

sudo apt update
Make sure we install the docker from the docker repository, not from the repository that has Ubuntu

apt-cache policy docker-ce
And the output will come out as below:

  Installed: (none)
  Candidate: 18.03.1 ~ ce ~ 3-0 ~ ubuntu
  Version table:
     18.03.1 ~ ce ~ 3-0 ~ ubuntu 500
        500 https://download.docker.com/linux/ubuntu bionic / stable amd64 Packages
The last install the docker

sudo apt install docker-ce
Once installed, make sure if it is already installed by:

systemctl docker status
or if you can’t use systemctl, use this:

/etc/init.d/docker status
The second
If we have it installed, it’s all done, we just do what we want.

Well, we first try downloading the image first (the image is the same as .iso), how to, type it as below:

sudo docker pull ubuntu
Because I want to install Ubuntu, then what I pull is Ubuntu. If you want something else, try searching for Google what image is available on the docker.

After that, run it this way:

sudo docker run -i -t centos / bin / bash

Well, if we have entered, after that we exit the docker, we can see the process by:

sudo docker ps

Well, there is something similar to the docker ps, called docker images. So if in the docker images we can see the ID of the images that we have, and this will be used very much later. type

sudo docker images

Thank you
Maybe that’s what I can write this time, as usual, criticism & suggestions are needed in my writing to be better in the future. So, you can contact me via Twitter, Instagram, which is listed at the bottom of my website, or on the criticisms & suggestions menu which is right on the top of my web.


Leave a Reply

Your email address will not be published. Required fields are marked *