15 lines
269 B
Docker
15 lines
269 B
Docker
# Use an official Node.js image as the base
|
|
FROM node:16-alpine AS base
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
|
|
# Copy code and build for production
|
|
FROM base AS production
|
|
COPY . .
|
|
RUN npm run build
|
|
EXPOSE 9000
|
|
CMD ["npm", "start"]
|