| | FROM alpine:latest |
| | +ENV ENV="/etc/profile" |
| | |
| | -RUN apk update |
| | -RUN apk add --no-cache fontconfig curl |
| | +RUN apk --update add --no-cache fontconfig curl |
| | RUN rm -rf /var/cache |
| | + |
| | +# ######################################################################## |
| | +# |
| | +# Configure environment variables |
| | +# |
| | +# ######################################################################## |
| | +ENV PROFILE=/etc/profile |
| | +ENV CONTEXT_HOME=/opt/context |
| | +RUN echo "export CONTEXT_HOME=\"$CONTEXT_HOME\"" >> $PROFILE |
| | +RUN echo "export PATH=\"\$PATH:\$CONTEXT_HOME/tex/texmf-linuxmusl/bin\"" >> $PROFILE |
| | +RUN echo "export OSFONTDIR=\"/usr/share/fonts//\"" |
| | +RUN echo "PS1='\\u@typesetter:\\w\\$ '" >> $PROFILE |
| | |
| | # ######################################################################## |
 |
| | ADD "https://github.com/DaveJarvis/keenwrite-themes/releases/latest/download/theme-pack.zip" "theme-pack.zip" |
| | RUN unzip theme-pack.zip |
| | +RUN rm theme-pack.zip |
| | |
| | # ######################################################################## |
 |
| | WORKDIR "context" |
| | RUN sh install.sh |
| | - |
| | -# ######################################################################## |
| | -# |
| | -# Configure typesetter |
| | -# |
| | -# ######################################################################## |
| | -ENV PROFILE=/etc/profile |
| | -ENV CONTEXT_HOME=/opt/context |
| | -RUN echo "export CONTEXT_HOME=\"$CONTEXT_HOME\"" >> $PROFILE |
| | -RUN echo "export PATH=\"\$PATH:\$CONTEXT_HOME/tex/texmf-linuxmusl/bin\"" >> $PROFILE |
| | -RUN echo "export OSFONTDIR=\"/usr/share/fonts//\"" |
| | -RUN echo "PS1=\"typesetter:\\w\\\$ \"" >> $PROFILE |
| | |
| | # Remove unnecessary files |
| | -RUN source $PROFILE |
| | RUN rm -rf $CONTEXT_HOME/tex/texmf-context/doc |
| | RUN find . -type f -name "*.pdf" -exec rm {} \; |
| | |
| | -# Prepare to process text files. |
| | +# Prepare to process text files |
| | WORKDIR "/root" |
| | + |
| | |
| | |