sw-jobs-api/client/Dockerfile

22 lines
466 B
Docker
Raw Normal View History

2024-05-29 21:28:58 +00:00
# Use an official node runtime as a parent image
FROM node:20
# Set the working directory to /client
WORKDIR /client
# Copy package.json and package-lock.json to /client
COPY package*.json ./
# Install any needed packages specified in package.json
RUN npm install
# Copy the current directory contents into the container at /client
COPY . .
# Build the app
RUN npm run build
# Serve the app
RUN npm install -g serve
CMD ["serve", "-s", "public", "-l", "3000"]