Skip to content

Commit e712f88

Browse files
committed
Add fontconfig to prevent crashing
1 parent 0be0e8e commit e712f88

File tree

5 files changed

+40
-4
lines changed

5 files changed

+40
-4
lines changed

5/alpine3.22/Dockerfile

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

5/bookworm/Dockerfile

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

6/alpine3.22/Dockerfile

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

6/bookworm/Dockerfile

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile.template

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,21 @@ FROM {{ .variants[env.variant].from }}
1313
{{ if is_alpine then ( -}}
1414
RUN apk add --no-cache \
1515
# add "bash" for "[["
16-
bash
16+
bash \
17+
# install fontconfig for sharp
18+
# https://github.com/lovell/sharp/blob/v0.34.2/docs/src/content/docs/install.md#fonts
19+
fontconfig
20+
{{ ) else ( -}}
21+
RUN set -eux; \
22+
apt-get update; \
23+
apt-get install -y --no-install-recommends \
24+
# install fontconfig for sharp
25+
# https://github.com/lovell/sharp/blob/v0.34.2/docs/src/content/docs/install.md#fonts
26+
fontconfig \
27+
; \
28+
{{ clean_apt }}
29+
{{ ) end -}}
1730

18-
{{ ) else "" end -}}
1931
# grab gosu for easy step-down from root
2032
# https://github.com/tianon/gosu/releases
2133
ENV GOSU_VERSION 1.19

0 commit comments

Comments
 (0)