Installing Docker

Okay so I’m just documenting the method I used to install docker onto my system. You can check out https://docs.docker.com/get-docker/ for a the official Docker installation instruction based on what kind of system you have.

  • Go to https://docs.docker.com/
  • Select the Download and install option
  • In my case, my system is Linux, so click on Docker for Linux
  • Under “Server,” select which OS flavor (CentOS, Debian, Fedora, Raspbian, Ubuntu) you want to install. I selected the Ubuntu option
    Note that we’re installing the Community Edition (which is free) here, not the Enterprise edition.
  • Check through the Pre-requisites list to ensure that you have the require OS on which Docker is supported. To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions: Ubuntu Groovy 20.10, Ubuntu Focal 20.04 (LTS), Ubuntu Bionic 18.04 (LTS) or Ubuntu Xenial 16.04 (LTS).
    To check which Ubuntu version you have open terminal and type :
cat /etc/*release*
  • Uninstall any old versions of Docker
sudo apt-get remove docker docker-engine docker.io containerd runc
  • So there are three methods to install Docker. One is by setting up Docker Repositories. Two is by installing the DEB package and installing it manually. Three is through automated convenience scripts. I’ll be using the third method.
    Run the following to download the script
curl -fsSL https://get.docker.com -o get-docker.sh

After this run the following command to execute the script.

sudo sh get-docker.sh

Congrats! Docker is now installed on your system.

  • You can check the version of Docker by typing in the following command
sudo docker version
  • Now let’s get an image from the Docker Hub onto our system. Here I used hello-world.
sudo docker pull hello-world

or

sudo docker run hello-world

If the container doesn’t exist on your host computer, then Docker will pull it from Docker Hub on its own.

*************

Leave a Reply

PHP JS HTML CSS BASH PYTHON CODE

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: