-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) 路 955 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (26 loc) 路 955 Bytes
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
30
31
32
33
34
35
36
FROM node:20-alpine
LABEL "com.github.actions.name"="Github Repo Display in README"
LABEL "com.github.actions.description"="Update your profile README with repositories that have the specified topic/tag"
LABEL "com.github.actions.icon"="star"
LABEL "com.github.actions.color"="blue"
LABEL "repository"="https://github.com/sansk/github-repo-display"
LABEL "homepage"="https://github.com/sansk/github-repo-display#readme"
LABEL "maintainer"="sansk <sangeetha.csk@gmail.com>"
# Install dependencies
RUN apk add --no-cache git
# Create app directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy source code
COPY dist/ ./dist/
# Create a non-root user
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001
# Change ownership of the app directory to the non-root user
RUN chown -R nextjs:nodejs /app
USER nextjs
# Set the entrypoint
ENTRYPOINT ["node", "/app/dist/index.js"]