-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
29 lines (22 loc) · 916 Bytes
/
Dockerfile
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
# syntax = docker/dockerfile:1.10
########################################
FROM --platform=${BUILDPLATFORM} golang:1.23.2-alpine3.20 AS builder
RUN apk update && apk add --no-cache make
ENV GO111MODULE=on
WORKDIR /src
COPY go.mod go.sum /src
RUN go mod download && go mod verify
COPY . .
ARG VERSION
ARG TAG
ARG SHA
RUN make build-all-archs
########################################
FROM --platform=${TARGETARCH} scratch AS release
LABEL org.opencontainers.image.source="https://github.com/sergelogvinov/proxmox-cloud-controller-manager" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.description="Proxmox VE CCM for Kubernetes"
COPY --from=gcr.io/distroless/static-debian12:nonroot . .
ARG TARGETARCH
COPY --from=builder /src/bin/proxmox-cloud-controller-manager-${TARGETARCH} /bin/proxmox-cloud-controller-manager
ENTRYPOINT ["/bin/proxmox-cloud-controller-manager"]