Skip to content

Commit e4e341c

Browse files
authored
feat: use distroless container image (#134)
Switched to the distroless container image to increase security.
1 parent 4845033 commit e4e341c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Containerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
FROM docker.io/golang:1.25.0 AS builder
1+
ARG GO_VERSION=1.25.3
2+
FROM docker.io/golang:${GO_VERSION} AS builder
23

34
WORKDIR /app
45
COPY . .
56

67
RUN CGO_ENABLED=0 go build .
78

8-
FROM docker.io/debian:bookworm
9-
10-
RUN apt-get update && \
11-
apt-get install -y --no-install-recommends ca-certificates curl && \
12-
apt-get clean && \
13-
rm -rf /var/lib/apt/lists/*
9+
FROM gcr.io/distroless/static-debian12:nonroot
1410

1511
COPY --from=builder /app/oxide-cloud-controller-manager /usr/bin/oxide-cloud-controller-manager
1612

0 commit comments

Comments
 (0)