-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.overlay-test
More file actions
38 lines (27 loc) · 1.03 KB
/
Dockerfile.overlay-test
File metadata and controls
38 lines (27 loc) · 1.03 KB
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
33
34
35
36
37
38
# Dockerfile for overlay-test-server - minimal HTTP health endpoint for CNI probing
# Multi-stage build targeting scratch for ~6-8MB final image
FROM golang:1.25-alpine AS builder
WORKDIR /build
# Copy go mod files first for layer caching
COPY go.mod go.sum ./
RUN go mod download
# Copy source
COPY . .
# Build static binary
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build \
-ldflags="-w -s" \
-trimpath \
-o overlay-test-server \
./cmd/overlay-test-server
# Runtime stage - scratch for minimal image
FROM scratch
COPY --from=builder /build/overlay-test-server /overlay-test-server
# Run as nobody (65534)
USER 65534:65534
EXPOSE 8023
ENTRYPOINT ["/overlay-test-server"]
LABEL org.opencontainers.image.title="Node Doctor Overlay Test Server" \
org.opencontainers.image.description="Minimal HTTP health server for CNI overlay network connectivity testing" \
org.opencontainers.image.vendor="SupportTools" \
org.opencontainers.image.source="https://github.com/supporttools/node-doctor"