Skip to content

Commit 66c87a0

Browse files
perf(docker): speed up image builds by configuring DNF to keep cache after installation
1 parent cd296bb commit 66c87a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,16 @@ LABEL org.opencontainers.image.authors="Robin Walter <[email protected]>" \
4242
# See: https://docs.docker.com/build/guide/mounts/
4343
# and: https://docs.docker.com/reference/dockerfile/#run
4444
# as well as: https://github.com/moby/buildkit/issues/1673
45+
# We set the option `keepcache=True` to tell DNF to keep all downloaded packages in the cache even
46+
# after a successfull installation. This should speed up building the image, since the packages
47+
# don't necessarily need to be redownloaded.
4548
RUN --mount=type=cache,id=latexworks-dnf,target=/var/cache/dnf,sharing=locked,mode=0755 \
4649
--mount=type=cache,id=latexworks-dnf-lists,target=/var/lib/dnf,sharing=locked,mode=0755 \
47-
dnf install --assumeyes \
50+
dnf install --assumeyes --setopt=install_weak_deps=False --setopt=keepcache=True \
4851
"${TEXLIVE}" \
4952
latexmk \
5053
texlive-chktex \
54+
texlive-texcount \
5155
# Install additional useful tools
5256
bash \
5357
curl \

0 commit comments

Comments
 (0)