Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save orbingol/ae3878a957eb40e254c6303c7932f58f to your computer and use it in GitHub Desktop.

Select an option

Save orbingol/ae3878a957eb40e254c6303c7932f58f to your computer and use it in GitHub Desktop.
Build and run Overleaf CE containers on macOS arm64

Get the repository

git clone https://github.com/overleaf/overleaf.git

I am using commit 6fa708982b376b8c7d281ef1d9c1f2487c34124e on the main branch

Build containers

Inside the overleaf repository:

docker build -t sharelatex-base -f ./server-ce/Dockerfile-base .
docker build -t sharelatex -f ./server-ce/Dockerfile --build-arg OVERLEAF_BASE_TAG=sharelatex-base .

Build the container that contains everything

Use the attached Dockerfile.full file

docker build -t sharelatex-full -f ./Dockerfile-full .
docker tag sharelatex-full:latest sharelatex/sharelatex:latest

Bring up the containers using docker-compose

Inside the overleaf repository:

docker compose up -d

Using Overleaf CE

First launch: Navigate to http://127.0.0.1:80/launchpad to create the admin account.

Navigate to http://127.0.0.1:80 on your web browser. Have fun! :)

# We build this container image locally
FROM sharelatex:latest
# Install dependencies
RUN apt-get update && apt-get install -y \
fontconfig \
fonts-roboto \
&& rm -rf /var/lib/apt/lists/*
# Install Source Sans fonts
RUN git clone https://github.com/adobe-fonts/source-sans.git \
&& cp source-sans/OTF/*.otf /usr/local/share/fonts/ \
&& rm -rf source-sans \
&& fc-cache -fv
# Update tlmgr and install necessary packages for Overleaf
RUN tlmgr update --self \
# Install full TeX Live to avoid missing packages
&& tlmgr install scheme-full \
# Install extra packages
&& tlmgr install \
accsupp \
# Update TeX Live path (required to run at the end of Dockerfile)
&& tlmgr path add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment