use node 20

This commit is contained in:
Chris Grimmett 2024-04-08 15:48:05 -08:00
parent 6eaba9b383
commit c657de3056
1 changed files with 4 additions and 12 deletions

View File

@ -1,23 +1,15 @@
FROM node:18.16-alpine
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
FROM node:20-alpine
# ENV PNPM_HOME="/pnpm"
# ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
# Installing libvips-dev for sharp Compatibility
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev libc6-compat git nasm bash gcompat
WORKDIR /app
COPY pnpm-lock.yaml package.json ./
#RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --shamefully-hoist
RUN pnpm install --shamefully-hoist
RUN pnpm install
ENV NODE_ENV=production
COPY ./packages/strapi .
RUN chown -R node:node /app
USER node
RUN pnpm run build
# FROM builder AS dev
# ENV NODE_ENV=development
# CMD ["pnpm", "run", "dev"]
ENTRYPOINT ["pnpm"]
CMD ["run", "start"]