-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 638 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 638 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
FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
# Create non-root user and set up permissions in a single layer
RUN adduser -k /dev/null -u 10001 -D gorge \
&& chgrp 0 /home/gorge \
&& chmod -R g+rwX /home/gorge
# Copy application binary with explicit permissions
COPY --chmod=755 gorge /
# Set working directory
WORKDIR /home/gorge
# Switch to non-root user
USER 10001
# Define volume
VOLUME [ "/home/gorge" ]
# Set health check
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost:8080/readyz || exit 1
ENV GORGE_BIND=0.0.0.0
ENTRYPOINT ["/gorge"]
CMD [ "serve" ]