Skip to content

Commit 1462ad1

Browse files
committed
Add fontconfig to prevent crashing
1 parent d9131c1 commit 1462ad1

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

5/alpine/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ FROM node:20-alpine3.22
44

55
RUN apk add --no-cache \
66
# add "bash" for "[["
7-
bash
7+
bash \
8+
# install fontconfig for sharp
9+
# https://github.com/lovell/sharp/blob/v0.34.2/docs/src/content/docs/install.md#fonts
10+
fontconfig
811

912
# grab gosu for easy step-down from root
1013
# https://github.com/tianon/gosu/releases

5/debian/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
# https://github.com/nodejs/Release (looking for "LTS")
33
FROM node:20-bookworm-slim
44

5+
RUN set -eux; \
6+
apt-get update; \
7+
# install fontconfig for sharp
8+
# https://github.com/lovell/sharp/blob/v0.34.2/docs/src/content/docs/install.md#fonts
9+
apt-get install -y fontconfig; \
10+
rm -rf /var/lib/apt/lists/*
11+
512
# grab gosu for easy step-down from root
613
# https://github.com/tianon/gosu/releases
714
ENV GOSU_VERSION 1.19

6/alpine/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ FROM node:22-alpine3.22
44

55
RUN apk add --no-cache \
66
# add "bash" for "[["
7-
bash
7+
bash \
8+
# install fontconfig for sharp
9+
# https://github.com/lovell/sharp/blob/v0.34.2/docs/src/content/docs/install.md#fonts
10+
fontconfig
811

912
# grab gosu for easy step-down from root
1013
# https://github.com/tianon/gosu/releases

6/debian/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
# https://github.com/nodejs/Release (looking for "LTS")
33
FROM node:22-bookworm-slim
44

5+
RUN set -eux; \
6+
apt-get update; \
7+
# install fontconfig for sharp
8+
# https://github.com/lovell/sharp/blob/v0.34.2/docs/src/content/docs/install.md#fonts
9+
apt-get install -y fontconfig; \
10+
rm -rf /var/lib/apt/lists/*
11+
512
# grab gosu for easy step-down from root
613
# https://github.com/tianon/gosu/releases
714
ENV GOSU_VERSION 1.19

0 commit comments

Comments
 (0)