This commit is contained in:
Chris Grimmett 2024-04-08 15:11:07 -08:00
parent 131a1397e3
commit 2d70cd735f
1 changed files with 1 additions and 1 deletions

View File

@ -1,13 +1,13 @@
FROM node:18.16-alpine FROM node:18.16-alpine
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
ENV NODE_ENV=production
RUN corepack enable RUN corepack enable
# Installing libvips-dev for sharp Compatibility # 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 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 WORKDIR /app
COPY pnpm-lock.yaml package.json ./ COPY pnpm-lock.yaml package.json ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --shamefully-hoist RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --shamefully-hoist
ENV NODE_ENV=production
COPY ./packages/strapi . COPY ./packages/strapi .
RUN chown -R node:node /app RUN chown -R node:node /app
USER node USER node