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
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.
- Install Docker on Ubuntu 18.04 Bionic Beaver. This guide will show you how to get Docker running on top of Ubuntu 18.04.
- Install Docker on Debian 9. Read the complete tutorial to install Docker on Debian 9.
- Install Docker on Raspberry Pi. Want to run Docker on top of your Raspberry Pi? See how to do it.
- Install Docker on Manjaro. If you run Manjaro Linux, read this post to get Docker up and running on your system.
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"
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.
You can access the Docker commands by executing help command
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.
- Running SQL Server Docker Containers on Ubuntu 18.04. In this tutorial, you will learn how to run SQL Server container and connect it from SQL Server Management Studio (SSMS).
- Run MySQL Server Containers on Ubuntu 18.04. You will learn how to deploy the MySQL Server container on top of Ubuntu host. You will also learn how to connect to the MySQL container from the network.
- Run PostgreSQL Server Containers. On this article, you will learn how to deploy PostgreSQL container quickly. You will also learn how to connect and manage your PostgreSQL server using PgAdmin.
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 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.