add dockerfile

This commit is contained in:
AlecM33
2022-07-04 15:58:45 -04:00
parent f57cbc44bd
commit c34a4e9141
2 changed files with 22 additions and 2 deletions

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Use the official lightweight Node.js 12 image.
# https://hub.docker.com/_/node
FROM node:14-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.
# Copying this separately prevents re-running npm install on every code change.
COPY package*.json ./
# Install production dependencies.
RUN npm install --only=production
# Copy local code to the container image.
COPY . ./
# Run the web service on container startup.
CMD [ "npm", "start" ]