Make compile actually work
This commit is contained in:
8
latex/default/Dockerfile
Normal file
8
latex/default/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM alpine
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN apk add texlive texlive-bibtexextra texlive-context texlive-dvi texlive-fontutils texmf-dist-langgerman texlive-latexextra texlive-latexrecommended texlive-mathscience texlive-pictures texlive-plaingeneric texlive-pstricks texmf-dist-fontsrecommended texmf-dist-fontsextra
|
||||
|
||||
COPY ./entrypoint.sh /root/
|
||||
RUN chmod +x /root/entrypoint.sh
|
||||
20
latex/default/build-image.sh
Executable file
20
latex/default/build-image.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Build will be tagged with $1"
|
||||
echo "Build directory is $(pwd)"
|
||||
|
||||
OLD_IMG=$(docker image ls -q "$1")
|
||||
docker buildx build . -t "$1"
|
||||
|
||||
echo "Build complete, starting upload..."
|
||||
docker push "$1"
|
||||
|
||||
if [ -n "$OLD_IMG" ]; then
|
||||
if [ "$OLD_IMG" != "$(docker image ls -q "$1")" ]; then
|
||||
echo "New build uploaded, removing old image, id: $OLD_IMG"
|
||||
docker image rmi -f "$OLD_IMG" || true
|
||||
echo "Exit status: $?"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user