How To Get Started With Docker

Hey Everyone,

So I was planning to write some getting started guides for some trending technologies and frameworks for web applications development.

But, I was totally confused with one thing and that was the Operating System. Because, I don’t want to write getting started guides for all different OS that we commonly use. And this one confusion led me to Docker. As many of you might not know about Docker or might haven’t used it before. Therefore, I decided to help you get started with Docker with a minimum level introduction and installation guide.

So Let’s begin!!

What is Docker

And docker achieves this isolation using a loosely isolated environment called Container. Container is basically a standard unit of software that packages up code and all its dependencies. It helps you to get started and deliver applications quickly and reliably.

There is another important component of Docker infrastructure and that is Docker Engine. Docker Engine is an open source containerization technology. This is basically which actually helps you build new containers, and hold and run your containers within Docker. Docker Engine consists of three components. 1. A server with a background process or daemon, 2. Docker APIs that help other programs talk or communicate with Docker, 3. CLI or command line interface for Docker.

You can find more details about Docker, Containers and Docker Engine on the official Docker website and Google.

Installation

How to install on Windows and Mac

Here are URLs for both.

Docker installer, package or application consists of these components or modules for both of these operating systems.

  • Docker Engine
  • Docker CLI (command line interface) client
  • Docker Compose
  • Notary
  • Kubernetes
  • Credential Helper

I would highly recommend you to go ahead read more details about all of these except Kubernetes for now. Because, Kubernetes is a whole different entity or process and a crucial part of modern Continuous Integration (CI) and Continuous Deployment (CD) processes. And you should learn or master Docker first before jumping or getting started with Kubernetes.

How to install on Linux

Although, you can just download, either .deb and .rpm package according to your Linux distro, and install Docker by just double-clicking the installer. But, I would strongly recommend you to follow the process of installing Docker using Linux terminal and adding Docker repository to the repositories list of your machine. Because, when you install an application using a repository, you will not have to worry about updating this application or package in future. As your Linux distro will automatically check for available updates of all repositories including Docker whenever you run the update or install command.

I have created a video tutorial to explain and demonstrate that how we can install Docker on Ubuntu 20.04.

You can also check this page and follow instructions for your preferred Linux distro on Docker website.

Getting Started with Docker

> docker

Or you can also run > docker <COMMAND> — help to see help of any specific command to go deep in details and learn quickly. For example go ahead and try any or all of these.

> docker run --help> docker image --help> docker container --help

> docker version

You can see details about both my Docker client and server engines on my machine and your machine if you run the same command on your machine. Go ahead and try it. And may be share it on your Instagram or any other social media account with hashtag #gettingstartedwithdocker just like I did here for this guide.

> docker run

> docker run command also comes with a lot of different options. I would again encourage you to run > docker run — help to see all available options for run command or visit Docker website to see more details.

Conclusion

Also whenever you want to learn something new, especially something that involves use of a command terminal or shell, always try to go and play with things. Run commands, see help manuals and try experimenting different types of commands and use-cases. And if you are afraid of doing this on whatever machine you use, just setup a virtual machine and practice in it.

And By the way, for docker we don’t even need a separate virtual machine. Because, that’s why we have Docker containers. Just create a new practice container and you will be ready to roll.

I will see you in another getting started guide.

Until then take care. Allah Hafiz.

This guide was first appeared on the Zeeshan Elahi’s website at zeeshanelahi.com.

I am a son, husband, father, brother, friend, software engineering professional and fitness enthusiast. I love reading, writing, vlogging and sharing knowledge.