File size: 450 Bytes
0188a6a
 
45b9bf0
0188a6a
 
45b9bf0
0188a6a
04a901a
0188a6a
45b9bf0
0188a6a
f2e4670
447b213
0188a6a
 
 
 
 
 
 
 
 
 
 
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
# Use a specific version of the node image
FROM node:16-alpine

# Set working directory
WORKDIR /code

# Copy package.json and package-lock.json and install dependencies
COPY package*.json ./
RUN npm install --production

# Copy the rest of the application files
COPY . .

# Create a directory for temporary files
RUN mkdir /code/temp

# Expose port
EXPOSE 7860

# Set user to non-root
USER node

# Start Node.js application
CMD ["node", "index.js"]