Skip to content

Commit 00e4c85

Browse files
authored
Change base image and add health check
Updated base image for the builder stage and final stage. Added USER and HEALTHCHECK instructions.
1 parent 69ce98d commit 00e4c85

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/libops/go1.25:main@sha256:f43c9b34f888d2ac53e87c8e061554f826b8eb580863d7b21fd787b6f0378f8f AS builder
1+
FROM ghcr.io/libops/base:main@sha256:1185f74227c1c935b811e24971cc1b2d5deb615b9028779387a575027ef84d9d AS builder
22

33
SHELL ["/bin/ash", "-o", "pipefail", "-ex", "-c"]
44

@@ -14,7 +14,12 @@ COPY pkg ./pkg
1414
RUN --mount=type=cache,target=/root/.cache/go-build \
1515
CGO_ENABLED=0 go build -ldflags="-s -w" -o /app/binary .
1616

17-
FROM ghcr.io/libops/go1.25:main@sha256:f43c9b34f888d2ac53e87c8e061554f826b8eb580863d7b21fd787b6f0378f8f
17+
FROM ghcr.io/libops/base:main@sha256:1185f74227c1c935b811e24971cc1b2d5deb615b9028779387a575027ef84d9d
1818

1919
COPY --from=builder /app/binary /app/binary
2020

21+
USER goapp
22+
23+
ENTRYPOINT [ "/app/binary" ]
24+
25+
HEALTHCHECK CMD curl -sf -o /dev/null http://localhost:8080/healthcheck || exit 1

0 commit comments

Comments
 (0)