server_home/Dockerfile

18 lines
306 B
Docker

FROM node:20.10.0-slim
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install serve -g
# Assuming build will be used for release, not development; otherwise, remove the production-only flag.
RUN npm install --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["serve", "-s", "build"]