From 6efcea3b90b7f2b083cc8334786f6824e85443a3 Mon Sep 17 00:00:00 2001 From: macanhhuy Date: Sat, 22 Aug 2026 12:34:55 +0700 Subject: [PATCH] fix: install graphicsmagick in runtime stage gm npm wrapper shells out to the gm/convert binary on every avatar upload; the builder stage had it but the final runtime stage did not, so every upload 500'd with 'gm convert binaries can't be found'. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e12d33a..ee0edda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,10 @@ COPY 404.html /var/www/localhost/htdocs/404.html RUN mkdir /var/opt/out FROM alpine:3.23.4 -RUN apk update && apk upgrade && apk add --no-cache nodejs yarn nginx nginx-mod-http-headers-more && rm -rf /var/cache/apk/* +# graphicsmagick is required at runtime too — the gm npm wrapper shells out to the +# `gm`/`convert` binary on every upload; the builder stage has it, but the runtime +# stage does not unless we add it here. +RUN apk update && apk upgrade && apk add --no-cache nodejs yarn nginx nginx-mod-http-headers-more graphicsmagick && rm -rf /var/cache/apk/* COPY --from=builder /usr/share/vnc-avatar /usr/share/vnc-avatar COPY --from=builder /var/opt/out /var/opt/out