Coder Social home page Coder Social logo

nanmu42 / miktex-docker Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 3 KB

Dockerized MiKTeX, with preinstalled Chinese and Makefile support

Home Page: https://hub.docker.com/r/nanmu42/miktex-docker

Dockerfile 79.02% Shell 20.98%
miktex docker latex pdflatex

miktex-docker's Introduction

Dockerized MiKTeX

This image allows you to run MiKTeX on any computer that supports Docker.

This image is forked from https://github.com/MiKTeX/docker-miktex, with Chinese fonts and Makefile tools preinstalled.

Obtaining the image

Get the latest image from the registry:

docker pull nanmu42/miktex-docker

Using the image

Volumes

Input files

The host directory containing the input files must be mounted to the container path /miktex/work.

To mount the current host working directory, you would pass option -v $(pwd):/miktex/work to the Docker run command.

Package files

The container image contains a bare MiKTeX setup and MiKTeX is configured to install missing package files in the container directory /miktex/.miktex. It is recommended that you mount this directory to a dedicated Docker volume.

Running as root or not

By default, all commands inside the container are executed as root.

It is possible to execute as a dedicated host user by setting the container environment variables MIKTEX_GID and MIKTEX_UID.

To execute as the current user, you would pass options -e MIKTEX_GID=$(id -g) and -e MIKTEX_UID=$(id -u) to the Docker run command.

Example

First, create a Docker volume named miktex:

docker volume create --name miktex

This volume will be used to mount the the container directory /miktex/.miktex in subsequent runs.

Provided that your main input file is located in the current working directory, you can run pdflatex as follows:

docker run --rm -ti \
  -v miktex:/miktex/.miktex \
  -v $(pwd):/miktex/work \
  -e MIKTEX_GID=$(id -g) \
  -e MIKTEX_UID=$(id -u) \
  nanmu42/miktex-docker \
  pdflatex main.tex

miktex-docker's People

Contributors

nanmu42 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pablodz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.