Files
blog/cms/Dockerfile
T
davide 91540224a9 Lighten Strapi CMS: drop unused cloud plugin, disable telemetry/promo UI
Remove @strapi/plugin-cloud (deploy is self-hosted via Docker/Ansible,
never Strapi Cloud), disable the admin NPS/Enterprise-promotion flags
(single-admin panel, no upsell needed), disable Strapi's anonymous
telemetry, and prune dev dependencies from the production Docker image
layer.
2026-09-09 15:48:19 +02:00

20 lines
474 B
Docker

FROM node:22-alpine AS build
WORKDIR /app
# Sharp (image processing) needs these at install time on Alpine.
RUN apk add --no-cache build-base python3 vips-dev
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
RUN npm prune --omit=dev
FROM node:22-alpine AS runtime
WORKDIR /app
RUN apk add --no-cache vips
ENV NODE_ENV=production
COPY --from=build /app /app
RUN mkdir -p public/uploads && chown -R node:node /app
USER node
EXPOSE 1337
CMD ["npm", "run", "start"]