> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/fr/premiers-pas/requirements/setup-docker.md).

# Configurer Docker

Overleaf fonctionne avec Docker. Vous devez installer :

* Moteur Docker (Docker CE)
* Docker Compose **plugin** (`docker compose`, v2)

Ces étapes visent une version récente d'Ubuntu LTS (20.04/22.04/24.04).

{% hint style="warning" %}
Évitez d'installer `docker.io` du dépôt apt par défaut d'Ubuntu.\
Utilisez le dépôt officiel de Docker afin d'obtenir une version récente de Docker et le `docker compose` plugin.
{% endhint %}

La documentation officielle se trouve ici : <https://docs.docker.com/engine/install/ubuntu/>.

{% stepper %}
{% step %}

### 1) Supprimez les anciens paquets ou ceux en conflit (s'ils sont présents)

Si Docker a déjà été installé depuis une autre source, supprimez-le d'abord :

{% code overflow="wrap" %}

```bash
 sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)
```

{% endcode %}

Cette commande est sans risque si certains paquets ne sont pas installés.
{% endstep %}

{% step %}

### 2) Ajoutez le dépôt apt officiel de Docker

Installez les prérequis :

```bash
sudo apt update
sudo apt install -y ca-certificates curl
```

Ajoutez la clé GPG de Docker :

{% code overflow="wrap" %}

```bash
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
```

{% endcode %}

Ajoutez le dépôt :

{% code overflow="wrap" %}

```bash
# Ajoutez le dépôt aux sources Apt :
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF

sudo apt update
```

{% endcode %}
{% endstep %}

{% step %}

### 3) Installez le moteur Docker + le plugin Compose

Installez Docker et le plugin Compose :

{% code overflow="wrap" %}

```bash
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

{% endcode %}

Démarrez Docker au démarrage :

```bash
sudo systemctl enable --now docker
```

{% endstep %}

{% step %}

### 4) Vérifiez l'installation

Ces commandes doivent s'exécuter sans erreur :

```bash
docker --version
docker compose version
sudo docker run --rm hello-world
docker ps
```

{% endstep %}

{% step %}

### 5) (Facultatif) Exécuter Docker sans sudo

Ajoutez votre utilisateur au `docker` groupe :

```bash
sudo usermod -aG docker $USER
```

Puis **déconnectez-vous puis reconnectez-vous**, ou exécutez :

```bash
newgrp docker
```

Maintenant, cela devrait fonctionner sans `sudo`:

```bash
docker ps
```

{% hint style="danger" %}
Le `docker` Le groupe dispose d'un accès équivalent à root sur l'hôte.\
Cela est attendu pour les installations Overleaf typiques, et particulièrement pertinent si vous activez les compilations isolées.
{% endhint %}
{% endstep %}
{% endstepper %}

### Étape suivante

Une fois Docker opérationnel, continuez avec les étapes d'installation du Toolkit dans [Utilisation du Toolkit](/on-premises/fr/installation/using-the-toolkit.md).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/on-premises/fr/premiers-pas/requirements/setup-docker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
