-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
Dockerfile
29 lines (20 loc) · 619 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This file is the main docker file configurations
# Official Node JS runtime as a parent image
FROM node:20.0-alpine
# Set the working directory to ./app
WORKDIR /app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package.json ./
RUN apk add --no-cache git
# Install any needed packages
RUN npm install
# Audit fix npm packages
RUN npm audit fix
# Bundle app source
COPY . /app
# Make port 3000 available to the world outside this container
EXPOSE 3000
# Run app.js when the container launches
CMD ["npm", "start"]