How to install Docker on Ubuntu 18.10 and derivatives?

Docker and Ubuntu Minimal

Docker is undoubtedly a great open source project supported by a business entity with the same name which makes it much easier to run an application process within a relatively isolated environment which is called container or container.

Docker, unlike a virtual machine, has its own kernel, a container depends on the kernel of the host operating system, which allows it to be lighter and run much faster.

This is the simplest tool that gives our computer capabilities for the development and management of business applications.

With Docker basically we can perform container virtualization at the operating system level, but with the assurance that Docker uses Linux kernel resource isolation features such as cgroups and namespaces to allow independent containers to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines.

Docker It handles two versions, one that is paid for EE companies. (Enterprise Edition) and the other is the free version which is the one from the CE community (Community Edition).

By using containers, resources can be isolated, restricted services, and processes are given the ability to have an almost completely private view of the operating system with its own process space identifier, file system structure, and network interfaces. Multiple containers share the same kernel, but each container can be restricted to using only a defined amount of resources such as CPU, memory, and I / O.

The idea of ​​doing this is to provide layers of abstraction that allow a program to run regardless of the operating system that is running.

Therefore, this is very useful for system administrators who manage many different computers.

Combining Docker with Ubuntu 18.10 is practically a safe bet for container efficiency and ease of handling.

Docker installation on Ubuntu 18.10 and derivatives

There is currently a Docker package for Ubuntu 18.10, but this is generating some conflicts so, if you have not been able to install Docker correctly on your system, we can help you.

First of all we must perform an update of our packages, so we must open a terminal and in it we are going to execute the following commands:

sudo apt update

sudo apt upgrade

Done this now andIt is necessary that we install some packages necessary for the installation of Docker, using the following command:

sudo apt-get install apt-transport-https ca-certificates curl gnupg software-properties-common

Ahora si todo sale bien puedes realizar la instalación de Docker directamente con el siguiente comando:

[sourcecode language="bash"]sudo apt-get install docker-ce

docker-images

If the installation was not carried out, you should have received a message something like this:

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package docker-ce is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package 'docker-ce' has no installation candidate

This error We can solve it by typing the following commands in the terminal. First we are going to add the gpg key to the system, for this we must download it:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –

We add the repository to the system:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu cosmic nightly "

Note: when adding this repository we are using a development version, but for those who prefer it we can force the system to take the stable version of the repository for Bionic.

To do this, we only have to type the following:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

And finally we can install the application with:

sudo apt install docker-ce

How to use Docker?

At the end of the installation, to have the service run at system startup, we must use the following commands:

sudo systemctl enable docker

sudo systemctl start docker

To ensure that Docker is fully functional, it is a good idea to check the status of the service:

sudo systemctl status docker

Finally, if you want to see the Docker version.

docker -v

2 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Mg said

    Very good explanation. Thanks.

  2.   ROMSAT said

    David, as is normal in your line, a clear, short and direct article. I congratulate you. A small note would be that after adding the repository, make an update (update) and then proceed with its installation.
    Come on, greetings from Malaga (Spain)