fp/dockerfiles/strapi.dockerfile

16 lines
592 B
Plaintext
Raw Normal View History

2024-07-23 02:59:41 +00:00
FROM node:20 AS strapi
WORKDIR /usr/src/app/
2024-08-31 10:42:28 +00:00
RUN corepack enable && corepack prepare pnpm@9.6.0 --activate
2024-07-04 21:20:29 +00:00
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
2024-08-13 21:18:01 +00:00
# ENV NODE_EXTRA_CA_CERTS ${NODE_EXTRA_CA_CERTS}
# COPY ./certs ./certs
# RUN ls -la /usr/src/app/certs
2024-07-30 20:34:25 +00:00
COPY ./services/strapi/package.json ./services/strapi/pnpm-lock.yaml .
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm fetch
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prefer-offline
COPY ./services/strapi/ .
2024-08-13 21:18:01 +00:00
# RUN ls -la .
2024-07-23 02:59:41 +00:00
RUN ["pnpm", "run", "build"]
CMD ["pnpm", "run", "develop"]