Skip to content

Commit 3d98de6

Browse files
authored
Update Dockerfile
Add pinning for packages + healthcheck
1 parent e98edf0 commit 3d98de6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM golang:1.25-alpine3.22 AS build_deps
33
ARG TARGETARCH
44

5-
RUN apk add --no-cache git
5+
RUN apk add --no-cache git=2.49.1-r0
66

77
WORKDIR /workspace
88
ENV GO111MODULE=on
@@ -25,10 +25,14 @@ LABEL maintainer="vadimkim <[email protected]>"
2525
LABEL org.opencontainers.image.source="https://github.com/vadimkim/cert-manager-webhook-hetzner"
2626

2727
# Install minimal runtime
28-
RUN apk add --no-cache ca-certificates \
28+
RUN apk add --no-cache ca-certificates=20241121-r2 \
2929
&& adduser -D -u 1000 appuser
3030
USER appuser
3131

3232
COPY --from=build /workspace/webhook /usr/local/bin/webhook
3333

3434
ENTRYPOINT ["webhook"]
35+
36+
# Add healthcheck (adjust endpoint/port if needed)
37+
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
38+
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/healthz || exit 1

0 commit comments

Comments
 (0)