-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 712 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (23 loc) · 712 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
# Use a minimal base image
FROM alpine:latest
# Install necessary runtime dependencies
RUN apk add --no-cache \
ca-certificates \
curl
# Create a non-root user
RUN addgroup -g 1001 -S openapi2zig && \
adduser -S -D -H -u 1001 -s /sbin/nologin openapi2zig -G openapi2zig
# Copy the binary from the build artifacts
COPY artifacts/openapi2zig /usr/local/bin/openapi2zig
# Make the binary executable
RUN chmod +x /usr/local/bin/openapi2zig
# Switch to non-root user
USER openapi2zig
# Set the working directory
WORKDIR /app
# Expose a port if needed (adjust based on your application)
# EXPOSE 8080
# Set the entrypoint
ENTRYPOINT ["/usr/local/bin/openapi2zig"]
# Default command
CMD ["--help"]