Docker is an open source tool that is becoming more and more known worldwide. With Docker, you can execute a set of processes in isolation, create tools owing to the images and share them owing to its repository.
Images and containers
Two recurring words when talking about Docker are “images” and “containers”. You could say that they are part of Docker’s terminology. Docker images canuld be understood as a static component, since they are a base operating system, with a set of packaged applications, whereas a container is the installation or execution of an image, being able to execute several containers from the same image.
Virtualization vs Docker
Unlike virtualization, Docker does not emulate or virtualize an entire operating system. Instead, it makes the most of the operating system on which it is running, so it shares the core of the host operating system and even the libraries.
On the other hand, regarding the disk storage, a virtual machine can occupy several gigabytes since it has to contain an operating system. However, Docker containers only contain what differentiates them from the operating system they’re executed on, for example a Debian with Apache would only occupy about 190 MB.
From the point of view of processor and RAM memory consumption, the containers make efficient use of the host system, since they share resources with it (core of the system and part of the libraries). So containers use only the RAM and computing capacity they strictly need.
Docker image on Clouding
At Clouding we offer an Ubuntu 16.04 image with Docker 17.05.0-ce pre-installed and Ubuntu 18.04 image with Docker 18.09.xx. This way, we facilitate the installation of Docker so you have an image available to get to work on your projects almost instantaneously.
Still, if you want to have another distribution or operating system which uses Docker, we explain below how to install it.
Installing Docker on Debian/Ubuntu/Centos
If you need Docker to run on a different version of Ubuntu or another distribution, the installation process is as simple as following the steps bellow.
We will connect through SSH to our machine, once inside, we will check if we have installed wget:
# which wget
If the answer is as follows:
root@docker:~# which wget /usr/bin/wget
It means it has already been installed. If not, install it:
# apt-get install wget
# yum install wget
Once installed, execute this to initiate Docker installation:
# wget -qO- https://get.docker.com/ | sh
Once the process is over, the script will initiate the Docker service and we can use it regularly.
root@docker:~# docker -v Docker version 1.7.0, build 0baf609
It may show this notification too:
If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker your-user Remember that you will have to log out and back in for this to take effect!
By default, running the docker command requires administrator privileges, that is, you must add a user to sudo. For this matter, you can create a user to run docker:
# usermod -aG docker usuario
Docker Installation on Windows
To install Docker on Windows, you just have to install a program called Docker Toolbox that you can download from here. You only have to follow the steps. Once installed you can run the Docker Quickstart Terminal (a terminal to control Docker through commands) and Kitematic (a program with graphic interface to control the containers and Docker images).