We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98cb603 commit fcdfeaeCopy full SHA for fcdfeae
actions/github/createRelease/Dockerfile
@@ -20,10 +20,22 @@ FROM alpine:latest
20
# Install ca-certificates for HTTPS requests
21
RUN apk --no-cache add ca-certificates
22
23
-WORKDIR /root/
+# Create a non-root user
24
+RUN addgroup -g 1001 -S appgroup && \
25
+ adduser -u 1001 -S appuser -G appgroup
26
+
27
+# Set working directory
28
+WORKDIR /app
29
30
# Copy the binary from builder stage
31
COPY --from=builder /app/main .
32
33
+# Set ownership and permissions
34
+RUN chown appuser:appgroup /app/main && \
35
+ chmod +x /app/main
36
37
+# Switch to non-root user
38
+USER appuser
39
40
# Run the binary
-ENTRYPOINT ["./main"]
41
+ENTRYPOINT ["/app/main"]
0 commit comments