Skip to content

Commit

Permalink
Update to alpine 3.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
reijoh committed Mar 21, 2024
1 parent 8739d8f commit 46256aa
Show file tree
Hide file tree
Showing 4 changed files with 2,275 additions and 423 deletions.
36 changes: 32 additions & 4 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,50 @@
# Base ##################################################################
ARG base_image_version=3.16
ARG base_image_version=3.19
FROM alpine:$base_image_version AS alpine-builder-base
WORKDIR /app

ARG lua_version=5.4
RUN apk --no-cache add \
alpine-sdk \
bash \
binutils-gold \
ca-certificates \
curl \
cabal \
fakeroot \
gcc \
ghc \
git \
gmp-dev \
g++ \
libc-dev \
libffi \
libffi-dev \
lua$lua_version-dev \
make \
musl-dev \
ncurses-dev \
perl \
pkgconfig \
tar \
xz \
yaml \
zlib-dev

# Install GHCup, GHC, Cabal
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
# Add ghcup to PATH
ENV PATH=${PATH}:/root/.local/bin
ENV PATH=${PATH}:/root/.ghcup/bin
# Update Path to include Cabal and GHC exports
RUN bash -c "echo PATH="$HOME/.local/bin:$PATH" >> $HOME/.bashrc"
RUN bash -c "echo export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" >> $HOME/.bashrc"
RUN bash -c "source $HOME/.bashrc"

# Use the same minor GHC version as Pandoc
RUN ghcup install ghc --set 9.6
RUN ghcup install cabal --set 3.10

COPY cabal.root.config /root/.cabal/config
RUN cabal --version \
&& ghc --version \
Expand Down Expand Up @@ -103,13 +128,14 @@ FROM alpine-core as alpine-latex

# NOTE: to maintainers, please keep this listing alphabetical.
RUN apk --no-cache add \
bind-tools \
curl \
fontconfig \
freetype \
gnupg \
gzip \
perl \
tar \
wget \
xz

# TeXLive binaries location
Expand Down Expand Up @@ -162,7 +188,9 @@ RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /root/extra_packages.txt | \
&& rm -f /root/texlive.profile \
/root/extra_packages.txt

RUN pip3 --no-cache-dir install -r /root/extra_requirements.txt \
RUN python3 -m venv .venv \
&& . .venv/bin/activate \
&& pip --no-cache-dir install -r /root/extra_requirements.txt \
&& rm -f /root/extra_requirements.txt

ARG TEMPLATES_DIR=/.pandoc/templates
Expand All @@ -173,4 +201,4 @@ RUN mkdir -p ${TEMPLATES_DIR} && \
# eisvogel
ARG EISVOGEL_REPO=https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template
ARG EISVOGEL_VERSION=v2.4.0
RUN wget ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex -O ${TEMPLATES_DIR}/eisvogel.latex
RUN curl -o ${TEMPLATES_DIR}/eisvogel.latex ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex
14 changes: 4 additions & 10 deletions common/latex/install-texlive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ if [ "$tlversion" = "$default_version" ]; then
# always use the mirror URL, we'd run into problems whenever we get
# installer and signatures from different mirrors that are not 100%
# in sync.
installer_url=$(wget --quiet --output-document=/dev/null \
--server-response \
http://mirror.ctan.org/systems/texlive/tlnet/ \
2>&1 | \
sed -ne 's/.*Location: \(.*\)$/\1/p')
installer_url=$(curl -L -o /dev/null -w '%{url_effective}' https://mirror.ctan.org/systems/texlive/tlnet)
repository=
else
installer_url="\
Expand All @@ -26,11 +22,9 @@ ftp://tug.org/historic/systems/texlive/$tlversion/tlnet-final"
fi

# Download the install-tl perl script.
wget --no-verbose \
"$installer_url/$installer_archive" \
"$installer_url/$installer_archive".sha512 \
"$installer_url/$installer_archive".sha512.asc \
|| exit 1
curl -o "$installer_archive" "$installer_url"/"$installer_archive" || exit 1
curl -o "$installer_archive".sha512 "$installer_url"/"$installer_archive".sha512 || exit 1
curl -o "$installer_archive".sha512.asc "$installer_url"/"$installer_archive".sha512.asc || exit 1

## Verifiy installer integrity
# get current signing key
Expand Down
Loading

0 comments on commit 46256aa

Please sign in to comment.