FROM sharelatex/sharelatex RUN tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet RUN tlmgr update --self --all RUN tlmgr install scheme-full RUN echo '$#! /bin/bash\npushd /usr/local/bin\nfor f in `ls /usr/local/texlive/2023/bin/x86_64-linux`\ndo\n[ -f $f ] || ln -s /usr/local/texlive/2023/bin/x86_64-linux/$f $f\ndone' > /overleaf/link.sh RUN cat /overleaf/link.sh RUN chmod +x /overleaf/link.sh RUN bash /overleaf/link.sh WORKDIR / ENTRYPOINT ["/sbin/my_init"]
在保存Dockerfile的文件夹下,运行docker build生成新的docker镜像:
1
build --tag chinglin/sharelatex:latest --progress=plain . 2>&1 | tee build.log
# SHARELATEX_LEFT_FOOTER: '[{"text": "Powered by <a href=\"https://www.sharelatex.com\">ShareLaTeX</a> 2016"},{"text": "Another page I want to link to can be found <a href=\"here\">here</a>"} ]' # SHARELATEX_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]'
# See https://github.com/jwilder/nginx-proxy for documentation on how to configure the nginx-proxy container, # and https://github.com/overleaf/overleaf/wiki/HTTPS-reverse-proxy-using-Nginx for an example of some recommended # settings. We recommend using a properly managed nginx instance outside of the Overleaf Server Pro setup, # but the example here can be used if you'd prefer to run everything with docker-compose
The following instructions are not necessary if you use the Overleaf Toolkit or if you use an external Mongo database already configured as a replica set.
If you run MongoDB with docker-compose, add the following command to the mongo container configuration:
1 2
mongo: command: "--replSet overleaf"
Restart the mongo container then start a mongo shell with docker-compose exec -it mongo mongo. In that shell, run the following command to initiate the replica set: