From 8a40531d769bad0bb8429f0ca8bc635d5540e0dd Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Sun, 7 Apr 2024 03:14:51 -1000 Subject: [PATCH] Include Sharp in Docker build --- Dockerfile | 3 +++ build.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e2c8d7e6..6c3c916d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,9 @@ WORKDIR /temp RUN bunx --bun prisma generate RUN bun run prod-build COPY prisma /temp/dist +WORKDIR /temp/dist +# Add sharp +RUN bun add sharp # copy production dependencies and source code into final image # Alpine (musl) causes errors with Bun :( diff --git a/build.ts b/build.ts index e65b8051..baf1e009 100644 --- a/build.ts +++ b/build.ts @@ -26,7 +26,7 @@ await Bun.build({ target: "bun", splitting: true, minify: false, - external: ["bullmq", "@prisma/client"], + external: ["bullmq", "@prisma/client", "sharp"], }).then((output) => { if (!output.success) { console.log(output.logs);