Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update base image #9

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/scripts/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ set -eu
installer_image=${TEXLIVE_INSTALLER_IMAGE:-'texlive-installer:latest'}
image_tag_list="${IMAGE_TAG_LIST:-/dev/stdout}"

# NB: Can't seem to resolve mirrors.ctan.org from within 'docker build', so do it here:
ctan_mirror="$(curl -Ls -o /dev/null -w '%{url_effective}' https://mirrors.ctan.org)"
echo "Will use CTAN mirror ${ctan_mirror}"

ref="${1}"
profile="${2:-minimal}"
commit_time="$(date --date="@$(git show -s --format=%ct HEAD)" --rfc-3339=seconds)"
Expand All @@ -32,6 +36,7 @@ case "${ref}" in
--cache-from "${installer_image}" \
--tag "$(make_docker_tag "${profile}" "${version}")" \
--tag "$(make_docker_tag "${profile}" latest)" \
--build-arg "ctan_mirror=${ctan_mirror}" \
--build-arg "profile=${profile}" \
--build-arg "label_created=${commit_time}" \
--build-arg "label_version=${version}" \
Expand All @@ -46,6 +51,7 @@ case "${ref}" in
docker build \
--cache-from "${installer_image}" \
--tag "$(make_docker_tag "${profile}" "${version}")" \
--build-arg "ctan_mirror=${ctan_mirror}" \
--build-arg "profile=${profile}" \
--build-arg "label_created=${commit_time}" \
--build-arg "label_version=${version}" \
Expand All @@ -61,6 +67,7 @@ case "${ref}" in
docker build \
--cache-from "${installer_image}" \
--tag "$(make_docker_tag "${profile}" "${version}")" \
--build-arg "ctan_mirror=${ctan_mirror}" \
--build-arg "profile=${profile}" \
.
make_docker_tag "${profile}" "${version}" >> "${image_tag_list}"
Expand Down
5 changes: 5 additions & 0 deletions .github/scripts/build-installer-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ set -e

installer_image=${TEXLIVE_INSTALLER_IMAGE:-'texlive-installer:latest'}

# NB: Can't seem to resolve mirrors.ctan.org from within 'docker build', so do it here:
ctan_mirror="$(curl -Ls -o /dev/null -w '%{url_effective}' https://mirrors.ctan.org)"
echo "Will use CTAN mirror ${ctan_mirror}"

docker build --no-cache \
--build-arg "ctan_mirror=${ctan_mirror}" \
--target "texlive-installer" \
--tag "${installer_image}" \
.
Expand Down
21 changes: 15 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18@sha256:82d1e9d7ed48a7523bdebc18cf6290bdb97b82302a8a9c27d4fe885949ea94d1 AS texlive-installer
FROM alpine:3.18@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 AS texlive-installer

# renovate: datasource=repology depName=alpine_3_18/bash versioning=loose
ENV BASH_VERSION="5.2.15-r5"
Expand All @@ -15,11 +15,11 @@ ENV LIBPNG_VERSION="1.6.39-r3"
# renovate: datasource=repology depName=alpine_3_18/gcc versioning=loose
ENV LIBSTDCPP_VERSION="12.2.1_git20220924-r10"
# renovate: datasource=repology depName=alpine_3_18/libx11 versioning=loose
ENV LIBX11_VERSION="1.8.4-r4"
ENV LIBX11_VERSION="1.8.7-r0"
# renovate: datasource=repology depName=alpine_3_18/musl versioning=loose
ENV MUSL_VERSION="1.2.4-r1"
ENV MUSL_VERSION="1.2.4-r2"
# renovate: datasource=repology depName=alpine_3_18/perl versioning=loose
ENV PERL_VERSION="5.36.1-r2"
ENV PERL_VERSION="5.36.2-r0"
# renovate: datasource=repology depName=alpine_3_18/pixman versioning=loose
ENV PIXMAN_VERSION="0.42.2-r1"
# renovate: datasource=repology depName=alpine_3_18/wget versioning=loose
Expand All @@ -44,7 +44,10 @@ RUN apk --no-cache add \
xz=${XZ_VERSION} \
zlib=${ZLIB_VERSION}

RUN wget mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \
ARG ctan_mirror="https://mirrors.ctan.org"
ENV CTAN_MIRROR=$ctan_mirror

RUN wget "${CTAN_MIRROR}/systems/texlive/tlnet/install-tl-unx.tar.gz" \
&& tar -xzf install-tl-unx.tar.gz \
&& rm install-tl-unx.tar.gz \
&& mv install-tl-* install-tl
Expand All @@ -66,14 +69,20 @@ RUN tlversion=$(cat install-tl/release-texlive.txt | head -n 1 | awk '{ print $5
&& ln -s /usr/local/texlive/${tlversion}/bin/x86_64-linuxmusl /usr/local/texlive/${tlversion}/bin/x86_64-linux \
&& ln -s /usr/local/texlive/${tlversion}/bin/x86_64-linuxmusl/mktexlsr /usr/local/bin/mktexlsr

ARG ctan_mirror="https://mirrors.ctan.org"
ENV CTAN_MIRROR=$ctan_mirror

RUN ( cd install-tl \
&& tlversion=$(cat release-texlive.txt | head -n 1 | awk '{ print $5 }') \
&& sed -i "s/\${tlversion}/${tlversion}/g" ${profile}.profile \
&& ./install-tl -profile ${profile}.profile \
&& ./install-tl -repository="${CTAN_MIRROR}/systems/texlive/tlnet" -profile ${profile}.profile \
) \
&& rm -rf install-tl \
&& tlmgr version | tail -n 1 > version \
&& echo "Installed on $(date)" >> version
# && tlmgr option repository "${CTAN_MIRROR}"
# TODO: Determine if this is necessary -- shouldn't be, and
# we don't want to hammer the same mirror whenever the image is used!

ARG src_dir="/work/src"
ARG tmp_dir="/work/tmp"
Expand Down
Loading