File size: 519 Bytes
dc5a95d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use the official Node.js image as the base image
FROM node:20.4

# Set the working directory in the container
WORKDIR /app

# Clone repository with secret mount
RUN --mount=type=secret,id=CLONE,mode=0444,required=true \
  git clone https://$(cat /run/secrets/CLONE)@github.com/locmaymo/status-page.git .

# Change ownership and permissions
RUN chown -R node:node /app && \
    chmod -R 755 /app

# Switch to non-root user
USER node

# Install dependencies
RUN npm install

# Start the application
CMD ["npm", "start"]