17 lines
320 B
Plaintext
17 lines
320 B
Plaintext
FROM node:18-alpine
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy package.json and package-lock.json first (for better caching)
|
|
COPY package*.json ./
|
|
|
|
# Install all dependencies (both production & dev)
|
|
RUN npm install
|
|
|
|
# Copy the rest of the application
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN npm run build
|
|
|
|
CMD [ "npm", "run", "start" ] |