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

The official document comes from: https://docs.docker.com/engine/install/ubuntu/arrow-up-right.

1

1) Remove old/conflicting packages (if present)

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

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

This command is safe if some packages are not installed.

2

2) Add Docker’s official apt repository

Install prerequisites:

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

Add the Docker GPG key:

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

Add the repository:

# 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) Install Docker Engine + Compose plugin

Install Docker and the Compose plugin:

sudo apt install 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?