diff --git a/Dockerfile b/Dockerfile index 0797fe2c..b9678775 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ FROM ubuntu:16.04 LABEL maintainer="Ce Gao(gaocegege) " +ARG VERSION=${version:-"2018"} +ARG PLATFORM=${platform:-"x86_64-linux"} + +ENV PATH=${PATH}:"/usr/local/texlive/${VERSION}/bin/${PLATFORM}" ENV REMOTE="http://mirror.ctan.org/systems/texlive/tlnet" ENV INSTALL="/tmp/install-texlive" @@ -27,14 +31,9 @@ RUN apt-get update && apt-get install -y \ RUN mkdir -p ${INSTALL} \ && curl -sSL $REMOTE/install-tl-unx.tar.gz | tar -xzv -C ${INSTALL} --strip-components=1 -COPY .ci/tl.profile /etc/tl.profile +COPY .ci/ /etc/ RUN ${INSTALL}/install-tl -profile /etc/tl.profile -RUN export VERSION=$($INSTALL/install-tl --version | grep 'version' | grep -o '[0-9]\{4\}') -RUN export PLATFORM=$($INSTALL/install-tl --print-platform) -RUN export TEXBIN="/usr/local/texlive/${VERSION}/bin/${PLATFORM}" -RUN export "PATH=$TEXBIN:$PATH" - RUN tlmgr install latexmk ulem WORKDIR /workdir