Skip to content

Commit c8e4f11

Browse files
committed
Fix templates dir setting
1 parent b343a37 commit c8e4f11

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

alpine/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,17 @@ RUN apk --no-cache add py-pip \
179179
RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /root/extra_packages.txt | \
180180
xargs tlmgr install \
181181
&& rm -f /root/extra_packages.txt
182-
ARG TEMPLATES_DIR=$XDG_DATA_HOME/pandoc
182+
183+
# Templates
184+
ARG PANDOC_DATA_DIR=$XDG_DATA_HOME/pandoc
185+
ARG TEMPLATES_DIR=$PANDOC_DATA_DIR/templates
186+
RUN mkdir -p $TEMPLATES_DIR
183187

184188
# eisvogel
185189
ARG EISVOGEL_REPO=https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template
186190
ARG EISVOGEL_VERSION=2.4.2
187-
RUN wget ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex -O ${TEMPLATES_DIR}/eisvogel.latex
191+
RUN wget ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex \
192+
-O ${TEMPLATES_DIR}/eisvogel.latex
188193

189194
# Lua filters
190195
ARG LUA_FILTERS_REPO=https://github.com/pandoc/lua-filters/releases/download

ubuntu/Dockerfile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,28 +190,23 @@ RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /root/extra_packages.txt | \
190190

191191
# Templates
192192
#
193-
# If docker is run with the `--user` option, the $HOME var
194-
# is empty when the user does not exist inside the container.
195-
# This causes several problems for pandoc. We solve the issue
196-
# by putting the pandoc templates in a shared space (TEMPLATES_DIR)
197-
# and creating symbolic links inside the `/root` home so that
198-
# the templates and packages can be accessed by root and a
199-
# non-existent `--user`
200-
#
201-
ARG TEMPLATES_DIR=$XDG_DATA_HOME/pandoc
193+
ARG PANDOC_DATA_DIR=$XDG_DATA_HOME/pandoc
194+
ARG TEMPLATES_DIR=$PANDOC_DATA_DIR/templates
195+
RUN mkdir -p $TEMPLATES_DIR
202196

203197
# eisvogel
204198
ARG EISVOGEL_REPO=https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template
205199
ARG EISVOGEL_VERSION=2.4.2
206-
RUN wget ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex -O ${TEMPLATES_DIR}/eisvogel.latex
200+
RUN wget ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex \
201+
-O ${TEMPLATES_DIR}/eisvogel.latex
207202

208203
# Lua Filters
209204
ARG LUA_FILTERS_REPO=https://github.com/pandoc/lua-filters/releases/download
210205
ARG LUA_FILTERS_VERSION=v2021-11-05
211206
RUN wget ${LUA_FILTERS_REPO}/${LUA_FILTERS_VERSION}/lua-filters.tar.gz \
212207
&& tar xzf lua-filters.tar.gz \
213208
--strip-components=1 \
214-
--one-top-level=TEMPLATES_DIR \
209+
--one-top-level=$PANDOC_DATA_DIR \
215210
&& rm -f lua-filters.tar.gz
216211

217212
# tectonic

0 commit comments

Comments
 (0)