安装docker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA] 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid [ unknown] Docker Release (CE deb) <[email protected]> sub rsa4096 2017-02-22 [S]
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
|
配置阿里源
1 2 3 4 5 6 7 8 9
| sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://7qewi63s.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
|
安装docker-compose
1 2 3 4 5
| pip install docker-compose
docker-compose --version
|
拉取镜像并配置
1 2 3 4 5 6 7 8
| docker pull sharelatex/sharelatex
mkdir ~/Docker && cd ~/Docker mkdir sharelatex && cd sharelatex
wget https://raw.githubusercontent.com/sharelatex/sharelatex/master/docker-compose.yml
|
修改配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13
| sharelatex: ports: - 50000:80 volumes: - ~/Docker/sharelatex_data:/var/lib/sharelatex environment: PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2020/bin/x86_64-linux/:/usr/local/texlive/2019/bin/x86_64-linux/ mongo: volumes: - ~/Docker/mongo_data:/data/db redis: volumes: - ~/Docker/redis_data:/data
|
创建Docker容器
安装升级完整texlive
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| docker exec -it sharelatex bash cd /usr/local/texlive
cp -a 2019 2020 wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh sh update-tlmgr-latest.sh -- --upgrade
tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet/
tlmgr update --self --all luaotfload-tool -fu
tlmgr install scheme-full exit
|
配置用户
1 2
| docker restart sharelatex
|
打开浏览器访问http://hostname:5000/launchpad
,创建Admin账户
文章参考:
https://www.bilibili.com/read/cv6547551/
[http://blog.codedo.cn/2020/04/16/Set Overleaf server/](http://blog.codedo.cn/2020/04/16/Set Overleaf server/)
激活邮箱服务和SSL证书:https://www.scaleway.com/en/docs/installing-sharelatex-ubuntu/