Created
September 18, 2023 11:24
-
-
Save sp90/9eed6ea37d8f0901064f394af85304ea to your computer and use it in GitHub Desktop.
Temp solution for sharp bun docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2 Stage build install sharp using npm | |
FROM node:20-bullseye-slim as installSharp | |
WORKDIR /app | |
COPY package.json package-lock.json ./ | |
RUN npm i sharp | |
# Install all deps using bun and copy the | |
# sharp install from first stage | |
FROM oven/bun as base | |
WORKDIR /app | |
COPY package.json bun.lockb ./ | |
RUN bun i | |
COPY --from=installSharp /app/node_modules/sharp /app/node_modules/sharp | |
COPY . /app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment