Docker Tutorial for Absolute Beginners

We would like to dedicate this Docker Tutorial page for anyone who wants to learn Docker. I was interested in Docker because of its powerful features. It was difficult for me at the beginning to find a good, easy to understand docker tutorials for an absolute beginner like me. That’s why I would like to dedicate this page for anyone who wants to learn Docker and all its features. This is a work in progress together with my other page that focuses on PostgreSQL Tutorial. This is a work in progress and we will keep this page up to date.  

Table of Content

Docker Tutorial for Beginners

docker tutorial

Chapter 1. Introduction

Containers have been changing the way we build, run and also distribute software in this modern era. With this new technology, developers can build their code on a local computer and ensure that their codes will run regardlessly of the environment. By eliminating the environmental barrier, developers can focus to their networking, resources and spend less in configuring environment and also dependencies. 

Docker took the existing container technology and then wrapped and expanded it in many ways. Now, you may find Docker with portable images and even a user-friendly interface. The Docker has two main components: Docker Engine and Docker Hub. These two distinct components made the Docker so powerful and easy to use. Docker Engine is responsible for creating and running containers. While Docker Hub is a cloud service for containers distributions. Users and developers can easily access Docker Hub to upload and download images and containers. 

The Differences between Containers vs Virtual Machine. Explore the key differences between Containers vs Virtual Machine. In the end, you can decide which technology you want to power on your businesses. 

Chapter 2. Installation

In this chapter, you will find several ways to install Docker on various systems. Docker supports Linux, Windows and also Mac OS X. 

Running Your First Docker Image

After you install Docker on your system, let’s do some test if it works properly. Let’s run our first Docker image. Run the following command on Terminal.

sudo docker run debian echo "Hello Manjaro.site"

Output:

dhani@dhani-ThinkPad-T420:~$ sudo docker run debian echo "hello manjaro.site"
Unable to find image 'debian:latest' locally
latest: Pulling from library/debian
55cbf04beb70: Pull complete 
Digest: sha256:f1f61086ea01a72b30c7287adee8c929e569853de03b7c462a8ac75e0d0224c4
Status: Downloaded newer image for debian:latest
hello manjaro.site

The command will check if Debian image is available locally. Since we don’t have it yet, it pulls Debian image from the repository. More example of running your first Docker Image.

Docker Commands

You can access the Docker commands by executing help command

docker --help

For a specific help command, you can use the following format

docker image --help

This will display the complete help command for docker image command.

Running Docker Containers

On this sections, I have several Docker Tutorials that will show you how to run several containers. 

Manage Docker Using GUI

There are several GUI application to manage the Docker. The following sections will show you some nice and useful GUI application to manage and administer your Docker. 

Portainer

Portainer is a lightweight, web-based management console for Docker. It comes with a simple and nice user interface. You can use Portainer to manage docker and perform tasks such as create new containers, manage images, start and stop containers and many more. 

Portainer itself is a Docker container. 

Docker Container Backup

Backup your Docker container using the simplest method. Backup is the first priority to protect your data inside the container. By backing up your container, your data, and all other files inside the container will be backed up. You can copy or move the backup to another computer and run or restore it there.