Commit d69dab0c authored by Lukas Nagel's avatar Lukas Nagel
Browse files

simplify container

parent f11926c0
......@@ -6,4 +6,5 @@
*.aux
*.fdb_latexmk
*.out/
.docker
example/example.tar.gz
......@@ -106,10 +106,13 @@ polish:
# Docker
docker:
docker: .docker
.docker: $(shell find docker/)
make -C docker
touch .docker
with-docker:
with-docker: | docker
docker run -v ${PWD}:/build:rw -it $${DOCKER_TAG:-itt:latest} "make -C /build $(RULE)"
.PHONY: presentation mindmap clean docker polish
......@@ -2,28 +2,32 @@
FROM pandoc/alpine-latex
ENTRYPOINT ["/bin/sh", "-c"]
# install make
RUN apk add --no-cache make
# install basics
RUN apk add --no-cache make curl perl python3
# install imagemagick for image conversion
RUN apk add --no-cache imagemagick
# install tlmgr
COPY install-tlmgr.sh /tmp/install-tlmgr.sh
RUN chmod +x /tmp/install-tlmgr.sh && /tmp/install-tlmgr.sh
# install standalone document class
RUN tlmgr install standalone
# install latexrun, which needs python3
RUN apk add --no-cache python3
RUN wget -q https://github.com/aclements/latexrun/raw/master/latexrun -O /bin/latexrun
RUN chmod +x /bin/latexrun
# install fira fonts for a modernish look
COPY install-fira-fonts.sh /tmp/install-fira-fonts.sh
RUN chmod +x /tmp/install-fira-fonts.sh && /tmp/install-fira-fonts.sh
RUN tlmgr install collection-fontsrecommended fontawesome stmaryrd
RUN tlmgr install needspace zref mdframed
RUN tlmgr install luatex85 luacode
# install latexrun
RUN curl -sLo /bin/latexrun https://github.com/aclements/latexrun/raw/master/latexrun && chmod +x /bin/latexrun
# install additional latex packages
ENV PATH "/opt/texlive/texdir/bin/x86_64-linuxmusl/tlmgr:${PATH}"
RUN tlmgr update --self && tlmgr install \
fontawesome \
luacode \
luatex85 \
mdframed \
needspace \
selnolig \
standalone \
zref \
&& rm -rf \
/opt/texlive/texdir/texmf-dist/doc \
/opt/texlive/texdir/readme-html.dir \
/opt/texlive/texdir/readme-txt.dir \
/opt/texlive/texdir/install-tl*
all: Dockerfile install-tlmgr.sh
all: Dockerfile install-fira-fonts.sh
docker build -t $${DOCKER_TAG:-itt:latest} .
clean:
# Create tmpdir
DIR=$(mktemp -d) ||
(echo "Error while creating temporary directory" 1>&2 && exit -1)
cd $DIR
# Download & unpack installer
wget --quiet http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz ||
(echo "Error while downloading archive" 1>&2 && exit -1)
tar -xzf install-tl-unx.tar.gz -C $DIR --strip-components=1 ||
(echo "Error while unpacking archive" 1>&2 && exit -1)
# install tl
echo 'selected_scheme collection-basic' > /tmp/texlive-profile.txt
$DIR/install-tl --profile=/tmp/texlive-profile.txt ||
(echo "Error while installing tlmngr" 1>&2 && exit -1)
wget --quiet https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh
chmod +x update-tlmgr-latest.sh && ./update-tlmgr-latest.sh
# cleanup
rm -rf $DIR
\usepackage{fontspec}
\usepackage{fontawesome}
\usepackage{stmaryrd}
\usepackage{listings}
\usepackage[framemethod=TikZ]{mdframed}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment