fp/strapi.dockerfile

15 lines
476 B
Plaintext
Raw Normal View History

2024-04-08 23:48:05 +00:00
FROM node:20-alpine
2024-04-08 23:52:57 +00:00
WORKDIR /app
2024-04-08 23:48:05 +00:00
# ENV PNPM_HOME="/pnpm"
# ENV PATH="$PNPM_HOME:$PATH"
2024-04-02 14:49:33 +00:00
RUN corepack enable
2024-04-08 18:23:31 +00:00
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev libc6-compat git nasm bash gcompat
2024-04-09 07:00:38 +00:00
COPY ./packages/strapi/pnpm-lock.yaml ./packages/strapi/package.json ./
2024-04-08 23:48:05 +00:00
RUN pnpm install
2024-04-09 07:00:38 +00:00
COPY ./packages/strapi .
2024-04-09 07:07:45 +00:00
ENV NODE_ENV=production
2024-04-09 07:00:38 +00:00
RUN pnpm run build
RUN chown -R node:node /app
USER node
ENTRYPOINT ["pnpm"]
CMD ["run", "start"]