dockerSetup Docker

Overleaf runs on Docker. You must install:

  • Docker Engine (Docker CE)

  • Docker Compose plugin (docker compose, v2)

These steps target a recent Ubuntu LTS (20.04/22.04/24.04).

circle-exclamation
1

1) Remove old/conflicting packages (if present)

If Docker was previously installed from another source, remove it first:

sudo apt-get remove -y docker.io docker-doc docker-compose podman-docker containerd runc

This command is safe if some packages are not installed.

2

2) Add Docker’s official apt repository

Install prerequisites:

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg

Add the Docker GPG key:

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

Add the repository:

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo ${VERSION_CODENAME}) stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
3

3) Install Docker Engine + Compose plugin

Install Docker and the Compose plugin:

sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Start Docker on boot:

sudo systemctl enable --now docker
4

4) Verify the installation

These commands should run without errors:

docker --version
docker compose version
sudo docker run --rm hello-world
docker ps
5

5) (Optional) Run Docker without sudo

Add your user to the docker group:

sudo usermod -aG docker $USER

Then log out and back in, or run:

newgrp docker

Now this should work without sudo:

docker ps
triangle-exclamation

Next step

Once Docker is working, continue with the Toolkit installation steps in Using the Toolkit.

Last updated

Was this helpful?