diff --git a/package/Dockerfile.k3k b/package/Dockerfile.k3k index 077ecb0e..5a9572ef 100644 --- a/package/Dockerfile.k3k +++ b/package/Dockerfile.k3k @@ -1,14 +1,12 @@ FROM registry.suse.com/bci/bci-base:16.1 -ARG TARGETPLATFORM -# BIN_DIR is the directory containing the binaries within the build context. -# GoReleaser (dockers_v2) stages binaries under a per-platform directory that -# matches TARGETPLATFORM (e.g. linux/amd64), so that is the default. Other -# callers (e.g. the Makefile) can override it, for example with BIN_DIR=bin. -ARG BIN_DIR=${TARGETPLATFORM} ARG BIN_K3K=k3k ARG BIN_K3KCLI=k3kcli +# BIN_DIR defaults to the buildx per-platform dir; override (e.g. BIN_DIR=bin) for flat layouts. +ARG TARGETPLATFORM +ARG BIN_DIR=${TARGETPLATFORM} + COPY ${BIN_DIR}/${BIN_K3K} /usr/bin/ COPY ${BIN_DIR}/${BIN_K3KCLI} /usr/bin/ diff --git a/package/Dockerfile.k3k-kubelet b/package/Dockerfile.k3k-kubelet index 606bb02b..f649a201 100644 --- a/package/Dockerfile.k3k-kubelet +++ b/package/Dockerfile.k3k-kubelet @@ -1,14 +1,11 @@ -# TODO: swicth this to BCI-micro or scratch. Left as base right now so that debug can be done a bit easier FROM registry.suse.com/bci/bci-base:16.1 -ARG TARGETPLATFORM -# BIN_DIR is the directory containing the binaries within the build context. -# GoReleaser (dockers_v2) stages binaries under a per-platform directory that -# matches TARGETPLATFORM (e.g. linux/amd64), so that is the default. Other -# callers (e.g. the Makefile) can override it, for example with BIN_DIR=bin. -ARG BIN_DIR=${TARGETPLATFORM} ARG BIN_K3K_KUBELET=k3k-kubelet +# BIN_DIR defaults to the buildx per-platform dir; override (e.g. BIN_DIR=bin) for flat layouts. +ARG TARGETPLATFORM +ARG BIN_DIR=${TARGETPLATFORM} + COPY ${BIN_DIR}/${BIN_K3K_KUBELET} /usr/bin/ ENTRYPOINT ["/usr/bin/k3k-kubelet"]