> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/docs-en/support/tutorials/linux/how-to-set-up-docker.md).

# How to deploy a Docker on Plenit

Read the following tutorial if you want to learn **how to set up Docker in Plenit** so you can deploy your applications quickly, easily, and securely.

Docker is a **software platform** that has enjoyed great popularity in recent years among systems teams, developers and, of course, **DevOps,** because **it allows heterogeneous solutions to be created, tested, and deployed** extremely quickly, without compromising the security of the solution.

When deployed, this **packages the software** **inside a container**, which is a standard unit that includes basic software, libraries, tools, and other elements that allow the deployed software to run.

In addition, it is a solution that allows the deployed elements to be modified, so inside a container **other elements can be added**, **complementary software**, **etc**. This solution is widely supported by systems and providers across all segments, and as it could not be otherwise, at Plenit we not only offer you the possibility of deploying them, but also help you do it.

### **How do you set up Docker in Plenit?**

#### **Prerequisites or pre-configuration**

To successfully complete this tutorial and be able to **set up Docker in Plenit** you will need:

* On the one hand, to be **registered on the Plenit Platform** with an organization and be registered in it after **logging in** [**Log-in**](https://admin.jotelulu.com/)
* On the other hand, [**having created a Server subscription**](https://jotelulu.com/soporte/tutoriales/como-desplegar-servidor)
* Have a **Ubuntu server** within the subscription.
* A user with **administrator privileges** either through "root" or using the "sudo" command.

#### **Step 1. Install the container service on my Ubuntu Linux**

The first thing we must do is update the apt package list.

To do this, we can use the command from root or with a user allowed in the sudoers list.

```
# apt-get update
```

or

```
# sudo apt-get update
```

After this, we will proceed to install the packages to enable the use of apt repositories over HTTPS.

```
# apt install apt-transport-https ca-certificates curl software-properties-common
```

or

```
# sudo apt install apt-transport-https ca-certificates curl software-properties-common
```

**NOTE:** *From now on we will omit one of the two options so as not to make the tutorial longer than necessary, but we must bear in mind that it will always be possible to use either "sudo" or the command with root or another user with elevated permissions.*

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2FQcM2wslID2SBsechCQoU%2F01_Paso-1.-Actualizamos-la-lista-de-paquetes-e-instalamos-soporte-para-HTTPS.png?alt=media&amp;token=367af600-4c40-4fdc-8a59-c3070bf661d4" alt=""><figcaption><p>Step 1. We update the package list and install support for HTTPS</p></figcaption></figure>

Next, we add the project's official GPG key:

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

We add the official repository, replacing the one that comes by default in Ubuntu 20.04:

```
# sudo add-apt-repository «deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable»
# apt-cache policy docker-ce
```

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2F6vAUYLdRT6WkmjAMw9gt%2F02_Paso-1.-Agregamos-la-clave-GPG-de-Dcoker-y-agregamos-el-repositorio-oficial-.png?alt=media&amp;token=3c275c02-4a0f-42f2-85f6-40d10f43dc23" alt=""><figcaption><p>Step 1. We add Docker's GPG key and add the official repository</p></figcaption></figure>

Finally, we proceed to install the Docker package:

```
# sudo apt install docker-ce
```

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2FV5HvVu81ebleeO7gADWJ%2F03_Paso-1.-Lanzamos-la-instalacion-de-Docker-desde-el-CLI-de-Ubuntu.png?alt=media&amp;token=96a60d70-d529-4025-9859-d37f4202e4ad" alt=""><figcaption><p>Step 1. We launch the Docker installation from the Ubuntu CLI</p></figcaption></figure>

At this point, the package is supposed to be installed already, but to make sure, we proceed to run a command that will check whether the service is running.

```
# sudo systemctl status Docker
```

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2FjZwvVVZmc8NCuBZ5i0Cx%2F04_Paso-1.-Comprobamos-que-el-servicio-de-Docker-se-esta-ejecutando-correctamente.png?alt=media&amp;token=ea94458d-7765-4022-966d-bc7a27e09212" alt=""><figcaption><p>Step 1. We check that the Docker service is running correctly</p></figcaption></figure>

Another test that can be done is the service's own test, that is, running the command and waiting for it to return the available options.

```
# docker
```

or

```
# docker info
```

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2FKOpn3v4kKjGsYwihvDJC%2F05_Paso-1.-Comprobamos-que-el-comando-Docker-esta-operativo.-.png?alt=media&amp;token=c84ea763-1872-4be7-a2af-f48060766782" alt=""><figcaption><p>Step 1. We check that the Docker command is operational.</p></figcaption></figure>

Another test can be to run Docker's "Hello World" command, that is, the classic "Hello World" so well known in computing.

```
# docker run hello-world
```

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2FhxtQMfkMXqTkwQeLLrLU%2F06_Paso-1.-Lanzamos-un-Hello-Word-de-Docker.png?alt=media&amp;token=4e589829-cbd3-4dc3-bc03-fee969450e0d" alt=""><figcaption><p>Step 1. We launch a Docker Hello World</p></figcaption></figure>

### **Conclusions:**

As you can see, **setting up Docker on Plenit's Ubuntu Linux servers** is very easy to do by following the steps we have described.

In this case we have seen how to deploy the container service on our GNU/Linux servers, **Ubuntu 20.04** (the latest version available as of this date) but the same procedure can be used for other versions with slight changes.

Thanks for joining us!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.plenit.com/docs-en/support/tutorials/linux/how-to-set-up-docker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
