> 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/nl/aan-de-slag/requirements/setup-docker.md).

# Docker instellen

Overleaf draait op Docker. U moet installeren:

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

Deze stappen zijn gericht op een recente Ubuntu LTS-versie (20.04/22.04/24.04).

{% hint style="warning" %}
Installeer niet `docker.io` uit Ubuntu's standaard apt-repository.\
Gebruik de officiële repository van Docker, zodat u een recente Docker-versie en de `docker compose` plug-in.
{% endhint %}

De officiële documentatie komt van: <https://docs.docker.com/engine/install/ubuntu/>.

{% stepper %}
{% step %}

### 1) Verwijder oude/conflicterende pakketten (indien aanwezig)

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

{% 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 %}

Dit commando is veilig als sommige pakketten niet zijn geïnstalleerd.
{% endstep %}

{% step %}

### 2) Voeg Docker's officiële apt-repository toe

Installeer vereisten:

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

Voeg de Docker GPG-sleutel toe:

{% 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 %}

Voeg de repository toe:

{% code overflow="wrap" %}

```bash
# Voeg de repository toe aan Apt-bronnen:
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) Installeer Docker Engine + Compose-plug-in

Installeer Docker en de Compose-plug-in:

{% code overflow="wrap" %}

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

{% endcode %}

Start Docker bij het opstarten:

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

{% endstep %}

{% step %}

### 4) Controleer de installatie

Deze commando's moeten zonder fouten worden uitgevoerd:

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

{% endstep %}

{% step %}

### 5) (Optioneel) Docker uitvoeren zonder sudo

Voeg uw gebruiker toe aan de `docker` groep:

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

Ga vervolgens **af en weer aan**, of voer uit:

```bash
newgrp docker
```

Nu zou dit moeten werken zonder `sudo`:

```bash
docker ps
```

{% hint style="danger" %}
De `docker` groep heeft op de host toegang die gelijkwaardig is aan root.\
Dit is verwacht voor typische Overleaf-installaties, en vooral relevant als u Sandboxed Compiles inschakelt.
{% endhint %}
{% endstep %}
{% endstepper %}

### Volgende stap

Zodra Docker werkt, ga verder met de installatie-stappen van de Toolkit in [De Toolkit gebruiken](/on-premises/nl/installatie/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/nl/aan-de-slag/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.
