fp/strapi.dockerfile

15 lines
440 B
Docker

FROM node:20-alpine
# ENV PNPM_HOME="/pnpm"
# ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
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 pnpm install
ENV NODE_ENV=production
COPY ./packages/strapi .
RUN chown -R node:node /app
USER node
RUN pnpm run build
ENTRYPOINT ["pnpm"]
CMD ["run", "start"]