使用docker 部署latex

本文档介绍了如何使用Docker实现LaTeX环境的隔离,确保不影响系统稳定性。通过下载Ubuntu 18.04镜像,启动容器并安装LaTeX,包括安装中文语言包。接着,展示了如何制作Docker镜像,以及将主机目录挂载到容器中进行编译。最后,解释了如何启动、停止Docker容器,并能在主机上查看编译结果。
摘要由CSDN通过智能技术生成

需求描述

为了使得安装的latex不影响系统的稳定性,同时兼顾学习docker的目的,本次环境构建需要满足需求如下:

1、docker进行latex环境隔离

2、latex的数据文件全部在host上进行编辑,可以利用host提供的ide环境

3、挂载host目录给docker进行进行编译

 

实施步骤一:下载docker镜像

jeffray@jeffray:~$ sudo docker pull ubuntu:18.04
18.04: Pulling from library/ubuntu
c64513b74145: Pull complete 
01b8b12bad90: Pull complete 
c5d85cf7a05f: Pull complete 
b6b268720157: Pull complete 
e12192999ff1: Pull complete 
Digest: sha256:3f119dc0737f57f704ebecac8a6d8477b0f6ca1ca0332c7ee1395ed2c6a82be7
Status: Downloaded newer image for ubuntu:18.04

查看下载的镜像

jeffray@jeffray:~$ sudo docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              18.04               735f80812f90        7 days ago          83.5MB
ubuntu              16.04               e13f3d529b1a        2 weeks ago         115MB
hello-world         latest              e38bc07ac18e        3 months ago        1.85kB

实施步骤二:启动docker镜像,安装latex

1、启动Ubuntu 1804的容器

jeffray@jeffray:~$ sudo docker run -it --rm ubuntu:18.04 bash

root@56a374364516:/# cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted

-i, --interactive                    Keep STDIN open even if not attached

-t, --tty                            Allocate a pseudo-TTY

--rm                             Automatically remove the container when it exits


2、安装la

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值