Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions dhcp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:1.26 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /bootz-dhcp ./dhcp/main

# hadolint ignore=DL3007
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=builder /bootz-dhcp /bootz-dhcp
# DHCP needs to run as root to bind to port 67 and use raw sockets.
# hadolint ignore=DL3002
USER nonroot
ENTRYPOINT ["/bootz-dhcp"]

HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD pgrep dhcp || exit 1

20 changes: 20 additions & 0 deletions http/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM golang:1.26 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /bootz-http ./http/main

# hadolint ignore=DL3007
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /www
COPY --from=builder /bootz-http /bootz-http
# HTTP server might need to run as root to bind to port 80.
# hadolint ignore=DL3002
USER nonroot
ENTRYPOINT ["/bootz-http"]
Comment thread
thesrinath marked this conversation as resolved.
CMD ["-address", ":8080"]

HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost:8080/health || exit 1

Loading