ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=24.04 |
ADD file:019ce26ec491bab156f6a15e93164ae5351fd38c7fff11d00c69c18e31e9dde3 in / |
CMD ["/bin/bash"] |
ARG QEMU_ARCH |
COPY . /bd_build # buildkit |
RUN |1 QEMU_ARCH= /bin/sh -c /bd_build/prepare.sh && /bd_build/system_services.sh && /bd_build/utilities.sh && /bd_build/cleanup.sh # buildkit |
ENV DEBIAN_FRONTEND=teletype LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 |
CMD ["/sbin/my_init"] |
ENV TEXMFVAR=/var/lib/overleaf/tmp/texmf-var |
ENV REBUILT_AFTER=2025-03-27 |
RUN /bin/sh -c true && rm -f /etc/apt/apt.conf.d/docker-clean && echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache && apt-get update && apt-get install -y unattended-upgrades build-essential wget net-tools unzip time imagemagick optipng strace nginx git python3 python-is-python3 zlib1g-dev libpcre3-dev gettext-base libwww-perl ca-certificates curl gnupg qpdf && unattended-upgrade --verbose --no-minimal-upgrade-steps && mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && apt-get update && apt-get install -y nodejs && rm -rf /etc/nginx/nginx.conf /etc/nginx/sites-enabled/default # buildkit |
ARG TEXLIVE_MIRROR=https://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet |
RUN |1 TEXLIVE_MIRROR=https://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet /bin/sh -c mkdir /install-tl-unx && wget --quiet https://tug.org/texlive/files/texlive.asc && gpg --import texlive.asc && rm texlive.asc && wget --quiet ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz && wget --quiet ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz.sha512 && wget --quiet ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz.sha512.asc && gpg --verify install-tl-unx.tar.gz.sha512.asc && sha512sum -c install-tl-unx.tar.gz.sha512 && tar -xz -C /install-tl-unx --strip-components=1 -f install-tl-unx.tar.gz && rm install-tl-unx.tar.gz* && echo "tlpdbopt_autobackup 0" >> /install-tl-unx/texlive.profile && echo "tlpdbopt_install_docfiles 0" >> /install-tl-unx/texlive.profile && echo "tlpdbopt_install_srcfiles 0" >> /install-tl-unx/texlive.profile && echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile && /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile -repository ${TEXLIVE_MIRROR} && $(find /usr/local/texlive -name tlmgr) path add && tlmgr install --repository ${TEXLIVE_MIRROR} latexmk texcount synctex etoolbox xetex && tlmgr path add && rm -rf /install-tl-unx # buildkit |
RUN |1 TEXLIVE_MIRROR=https://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet /bin/sh -c adduser --system --group --home /overleaf --no-create-home overleaf && mkdir -p /var/lib/overleaf && chown www-data:www-data /var/lib/overleaf && mkdir -p /var/log/overleaf && chown www-data:www-data /var/log/overleaf && mkdir -p /var/lib/overleaf/data/template_files && chown www-data:www-data /var/lib/overleaf/data/template_files # buildkit |
WORKDIR /overleaf |
ADD server-ce/genScript.js /overleaf/genScript.js # buildkit |
ADD server-ce/services.js /overleaf/services.js # buildkit |
ADD package.json package-lock.json /overleaf/ # buildkit |
ADD libraries/ /overleaf/libraries/ # buildkit |
ADD services/ /overleaf/services/ # buildkit |
ADD patches/ /overleaf/patches # buildkit |
RUN /bin/sh -c true && node genScript install | bash && node genScript compile | bash # buildkit |
ADD server-ce/runit /etc/service # buildkit |
ADD server-ce/config/env.sh /etc/overleaf/env.sh # buildkit |
ADD server-ce/nginx/nginx.conf.template /etc/nginx/templates/nginx.conf.template # buildkit |
ADD server-ce/nginx/overleaf.conf /etc/nginx/sites-enabled/overleaf.conf # buildkit |
ADD server-ce/nginx/clsi-nginx.conf /etc/nginx/sites-enabled/clsi-nginx.conf # buildkit |
ADD server-ce/logrotate/overleaf /etc/logrotate.d/overleaf # buildkit |
RUN /bin/sh -c chmod 644 /etc/logrotate.d/overleaf # buildkit |
ADD server-ce/cron /overleaf/cron # buildkit |
ADD server-ce/config/crontab-history /etc/cron.d/crontab-history # buildkit |
RUN /bin/sh -c chmod 600 /etc/cron.d/crontab-history # buildkit |
ADD server-ce/config/crontab-deletion /etc/cron.d/crontab-deletion # buildkit |
RUN /bin/sh -c chmod 600 /etc/cron.d/crontab-deletion # buildkit |
COPY server-ce/init_scripts/ /etc/my_init.d/ # buildkit |
COPY server-ce/init_preshutdown_scripts/ /etc/my_init.pre_shutdown.d/ # buildkit |
COPY server-ce/config/settings.js /etc/overleaf/settings.js # buildkit |
COPY server-ce/config/production.json /overleaf/services/history-v1/config/production.json # buildkit |
COPY server-ce/config/custom-environment-variables.json /overleaf/services/history-v1/config/custom-environment-variables.json # buildkit |
ADD server-ce/bin/grunt /usr/local/bin/grunt # buildkit |
RUN /bin/sh -c chmod +x /usr/local/bin/grunt # buildkit |
ADD server-ce/bin/flush-history-queues /overleaf/bin/flush-history-queues # buildkit |
RUN /bin/sh -c chmod +x /overleaf/bin/flush-history-queues # buildkit |
ADD server-ce/bin/force-history-resyncs /overleaf/bin/force-history-resyncs # buildkit |
RUN /bin/sh -c chmod +x /overleaf/bin/force-history-resyncs # buildkit |
COPY server-ce/config/latexmkrc /usr/local/share/latexmk/LatexMk # buildkit |
ENV SITE_MAINTENANCE_FILE=/etc/overleaf/site_status |
RUN /bin/sh -c touch $SITE_MAINTENANCE_FILE # buildkit |
ENV OVERLEAF_CONFIG=/etc/overleaf/settings.js |
ENV WEB_API_USER=overleaf |
ENV ADMIN_PRIVILEGE_AVAILABLE=true |
ENV OVERLEAF_APP_NAME=Overleaf Community Edition |
ENV OPTIMISE_PDF=true |
ENV KILL_PROCESS_TIMEOUT=55 |
ENV KILL_ALL_PROCESSES_TIMEOUT=55 |
ENV GRACEFUL_SHUTDOWN_DELAY_SECONDS=1 |
ENV NODE_ENV=production |
ENV LOG_LEVEL=info |
EXPOSE map[80/tcp:{}] |
ENTRYPOINT ["/sbin/my_init"] |
ARG MONOREPO_REVISION |
RUN |1 MONOREPO_REVISION=3b5a148cdc57d8a739d9773518309e54d0ecc3cd /bin/sh -c echo "monorepo-server-ce,$MONOREPO_REVISION" > /var/www/revisions.txt # buildkit |
-c tlmgr option repository https://ftp.tu-chemnitz.de/pub/tex/systems/texlive/tlnet && tlmgr update --self --all && tlmgr install scheme-full && luaotfload-tool -fu && tlmgr path add && apt update && apt install -y inkscape lilypond python3-pygments && echo shell_escape = t >> /usr/local/texlive/2025/texmf.cnf && echo 'server_tokens off;' > /etc/nginx/conf.d/security.conf |