mirror of
https://github.com/BartoszJarocki/cv.git
synced 2024-11-29 14:57:17 +03:00
23 lines
533 B
Docker
23 lines
533 B
Docker
# Use the official lightweight Node.js 18 image.
|
|
# https://hub.docker.com/_/node
|
|
FROM node:18-slim
|
|
|
|
# Create and change to the app directory.
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy application dependency manifests to the container image.
|
|
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
|
|
COPY package*.json ./
|
|
|
|
# Install all dependencies.
|
|
RUN npm install
|
|
|
|
# Copy local code to the container image.
|
|
COPY . .
|
|
|
|
# Build the app
|
|
RUN npm run build
|
|
|
|
# Run the web service on container startup.
|
|
CMD [ "npm", "start" ]
|