generated from gitcommitshow/github-app-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
29 lines (20 loc) · 767 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
# Use an official Node.js 20 runtime as a parent image
FROM node:20
# Create and set the working directory
RUN mkdir -p /home/node/rudder-github-app && chown -R node:node /home/node/rudder-github-app
# Set the working directory in the container
WORKDIR /home/node/rudder-github-app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install dependencies using npm ci
RUN npm ci --no-audit --cache .npm
# Copy the rest of the application code to the working directory
COPY . .
# Change ownership of the copied files to the node user
RUN chown -R node:node /home/node/rudder-github-app
# Switch to the node user
USER node
# Expose the port the app runs on
EXPOSE 3000
# Start the app using npm start
CMD ["npm", "start"]