Skip to content

Commit

Permalink
Add retry to curl
Browse files Browse the repository at this point in the history
  • Loading branch information
reijoh committed Apr 3, 2024
1 parent 87bb8b8 commit 1b3e38b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apk --no-cache add \
zlib-dev

# Install GHCup, GHC, Cabal
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org --retry 4 | sh
# Add ghcup to PATH
ENV PATH=${PATH}:/root/.local/bin
ENV PATH=${PATH}:/root/.ghcup/bin
Expand Down Expand Up @@ -98,6 +98,7 @@ LABEL org.pandoc.maintainer='Albert Krewinkel <[email protected]>'
LABEL org.pandoc.author "John MacFarlane"
LABEL org.pandoc.version "$pandoc_version"
LABEL com.azure.dev.pipelines.agent.handler.node.path "/usr/local/bin/node"
LABEL org.opencontainers.image.description "Modified from https://hub.docker.com/r/pandoc/extra to include additional packages configuration"

WORKDIR /data

Expand Down Expand Up @@ -189,7 +190,10 @@ COPY common/extra/packages.txt /root/extra_packages.txt
RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /root/extra_packages.txt | xargs tlmgr install && \
rm -f /root/extra_packages.txt

RUN python3 -m pip install --break-system-packages pandoc-latex-environment python-dotenv Office365-REST-Python-Client
RUN python3 -m pip install --break-system-packages --no-cache-dir \
pandoc-latex-environment \
python-dotenv \
Office365-REST-Python-Client

# Install eisvogel template
ARG TEMPLATES_DIR=/.pandoc/templates
Expand All @@ -199,6 +203,6 @@ RUN mkdir -p ${TEMPLATES_DIR} && \

ARG EISVOGEL_REPO=https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template
ARG EISVOGEL_VERSION=2.4.2
RUN curl -o ${TEMPLATES_DIR}/eisvogel.latex ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex
RUN curl -sSL --retry 4 -o ${TEMPLATES_DIR}/eisvogel.latex ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex

CMD [ "node" ]
8 changes: 4 additions & 4 deletions common/latex/install-texlive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +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=$(curl -L -o /dev/null -w '%{url_effective}' https://mirror.ctan.org/systems/texlive/tlnet)
installer_url=$(curl -L --retry 4 -o /dev/null -w '%{url_effective}' https://mirror.ctan.org/systems/texlive/tlnet)
repository=
else
installer_url="\
Expand All @@ -22,9 +22,9 @@ ftp://tug.org/historic/systems/texlive/$tlversion/tlnet-final"
fi

# Download the install-tl perl script.
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
curl --retry 4 -o "$installer_archive" "$installer_url"/"$installer_archive" || exit 1
curl --retry 4 -o "$installer_archive".sha512 "$installer_url"/"$installer_archive".sha512 || exit 1
curl --retry 4 -o "$installer_archive".sha512.asc "$installer_url"/"$installer_archive".sha512.asc || exit 1

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

0 comments on commit 1b3e38b

Please sign in to comment.