Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Set container prompt

AuthorDaveJarvis <email>
Date2022-12-11 16:59:52 GMT-0800
Commit4cffef7223abc6a154d3d93d55f7f6238a6493e4
Parent03d91e7
Delta17 lines added, 17 lines removed
container/Containerfile
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"
+
container/context-container.sh
readonly CONTAINER_NAME=typesetter
-
readonly CONTAINER_NETWORK=host