Files
citpl_cms_react_express_pos…/strapi-cms/Dockerfile
T

22 lines
404 B
Docker

FROM node:20-alpine
# Install native build tools for packages like better-sqlite3 / pg
RUN apk add --no-cache python3 make g++ gcc libc-dev
WORKDIR /app
# Copy package files and install dependencies
COPY package*.json ./
RUN npm install
# Copy rest of Strapi CMS source code
COPY . .
# Build Strapi admin interface
ENV NODE_ENV=production
RUN npm run build
EXPOSE 1337
CMD ["npm", "run", "start"]