Include Sharp in Docker build

This commit is contained in:
Jesse Wierzbinski 2024-04-07 03:14:51 -10:00
parent 885ec12780
commit 8a40531d76
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -24,6 +24,9 @@ WORKDIR /temp
RUN bunx --bun prisma generate RUN bunx --bun prisma generate
RUN bun run prod-build RUN bun run prod-build
COPY prisma /temp/dist COPY prisma /temp/dist
WORKDIR /temp/dist
# Add sharp
RUN bun add sharp
# copy production dependencies and source code into final image # copy production dependencies and source code into final image
# Alpine (musl) causes errors with Bun :( # Alpine (musl) causes errors with Bun :(

View file

@ -26,7 +26,7 @@ await Bun.build({
target: "bun", target: "bun",
splitting: true, splitting: true,
minify: false, minify: false,
external: ["bullmq", "@prisma/client"], external: ["bullmq", "@prisma/client", "sharp"],
}).then((output) => { }).then((output) => {
if (!output.success) { if (!output.success) {
console.log(output.logs); console.log(output.logs);