> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 0. Docker installeren

> Installeer Docker Engine en de Compose-plugin op Ubuntu voor een Overleaf-deployment.

Overleaf draait op Docker. Je moet het volgende installeren:

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

Deze stappen zijn bedoeld voor een recente Ubuntu LTS (20.04/22.04/24.04).

> [!WARNING]
>
> Installeer `docker.io` niet uit de standaard apt-repository van Ubuntu.\
> Gebruik de officiële repository van Docker, zodat je een recente Docker-versie en de `docker compose`-plugin krijgt.

De officiële documentatie is te vinden op: [https://docs.docker.com/engine/install/ubuntu/](https://docs.docker.com/engine/install/ubuntu/).

**1. 1) Oude/conflicterende pakketten verwijderen (indien aanwezig)**

Als Docker eerder vanuit een andere bron is geïnstalleerd, verwijder het dan eerst:

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

Dit commando is veilig, ook als sommige pakketten niet zijn geïnstalleerd.

**2. 2) De officiële apt-repository van Docker toevoegen**

Installeer de vereisten:

```bash theme={null}
sudo apt update
sudo apt install -y ca-certificates curl
```

Voeg de GPG-sleutel van Docker toe:

```bash wrap theme={null}
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
```

Voeg de repository toe:

```bash wrap theme={null}
# Add the repository to Apt sources:
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
```

**3. 3) Docker Engine + Compose-plugin installeren**

Installeer Docker en de Compose-plugin:

```bash wrap theme={null}
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

Start Docker automatisch bij het opstarten:

```bash theme={null}
sudo systemctl enable --now docker
```

**4. 4) De installatie controleren**

Deze commando's zouden zonder fouten moeten worden uitgevoerd:

```bash theme={null}
docker --version
docker compose version
sudo docker run --rm hello-world
docker ps
```

**5. 5) (Optioneel) Docker zonder sudo uitvoeren**

Voeg je gebruiker toe aan de groep `docker`:

```bash theme={null}
sudo usermod -aG docker $USER
```

**Log daarna uit en weer in**, of voer het volgende uit:

```bash theme={null}
newgrp docker
```

Nu zou dit zonder `sudo` moeten werken:

```bash theme={null}
docker ps
```

> [!CAUTION]
>
> De groep `docker` heeft toegang op root-niveau tot de host.\
> Dit is gebruikelijk bij typische Overleaf-installaties, en vooral relevant als je Sandboxed Compiles inschakelt.

### Volgende stap

Zodra Docker werkt, ga je verder met [1. De Toolkit downloaden](https://ayakaleaf-pro.mintlify.site/nl/on-premises/installation/using-the-toolkit/1.-download-the-toolkit.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.