fix: install graphicsmagick in runtime stage
Build + push avatar image / build-and-push (push) Failing after 17s

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'.
This commit is contained in:
macanhhuy
2026-08-22 12:34:55 +07:00
parent 0669f87134
commit 6efcea3b90
+4 -1
View File
@@ -20,7 +20,10 @@ COPY 404.html /var/www/localhost/htdocs/404.html
RUN mkdir /var/opt/out RUN mkdir /var/opt/out
FROM alpine:3.23.4 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 /usr/share/vnc-avatar /usr/share/vnc-avatar
COPY --from=builder /var/opt/out /var/opt/out COPY --from=builder /var/opt/out /var/opt/out