-
Notifications
You must be signed in to change notification settings - Fork 125
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (18 loc) · 815 Bytes
/
Dockerfile
File metadata and controls
22 lines (18 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# To avoid the `InvalidDefaultArgInFrom` warning during build time,
# we add a non-existent default builder image.
# https://docs.docker.com/reference/build-checks/invalid-default-arg-in-from/
ARG BUILDER_IMAGE='clusterpedia.io/builder:not-build'
FROM --platform=$BUILDPLATFORM ${BUILDER_IMAGE} AS builder
WORKDIR /clusterpedia
ARG BIN_NAME
ARG TARGETARCH
RUN GOARCH=${TARGETARCH} /builder.sh ${BIN_NAME}
# https://alpinelinux.org/releases/
# Once we select a branch, we will continue to use the relevant version until it ends support.
# The new branch selection must ensure that the patch version >= 3.
FROM alpine:3.21.5
RUN apk add --no-cache gcompat
# https://pkg.go.dev/net#hdr-Name_Resolution
ENV GODEBUG=netdns=go
ARG BIN_NAME
COPY --from=builder /clusterpedia/bin/${BIN_NAME} /usr/local/bin/${BIN_NAME}