Files
portfolio/dockerfile
Saad AlKathiri 5d25258f20 test
2025-03-27 18:26:47 +03:00

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" ]