Fix Docker COPY paths for goreleaser dockers_v2 platform layout

This commit is contained in:
copilot-swe-agent[bot]
2026-07-23 12:53:47 +00:00
committed by GitHub
parent 81d0e6cda7
commit 4a2de8f8a4
3 changed files with 19 additions and 6 deletions
+1
View File
@@ -46,6 +46,7 @@ package: package-k3k package-k3k-kubelet ## Package the k3k and k3k-kubelet Dock
.PHONY: package-%
package-%:
docker build -f package/Dockerfile.$* \
--build-arg BIN_DIR=bin \
-t $(REPO)/$*:$(VERSION) \
-t $(REPO)/$*:latest \
-t $(REPO)/$*:dev .
+10 -4
View File
@@ -1,9 +1,15 @@
FROM registry.suse.com/bci/bci-base:16.1
ARG BIN_K3K=bin/k3k
ARG BIN_K3KCLI=bin/k3kcli
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
COPY ${BIN_K3K} /usr/bin/
COPY ${BIN_K3KCLI} /usr/bin/
COPY ${BIN_DIR}/${BIN_K3K} /usr/bin/
COPY ${BIN_DIR}/${BIN_K3KCLI} /usr/bin/
CMD ["k3k"]
+8 -2
View File
@@ -1,8 +1,14 @@
# 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 BIN_K3K_KUBELET=bin/k3k-kubelet
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
COPY ${BIN_K3K_KUBELET} /usr/bin/
COPY ${BIN_DIR}/${BIN_K3K_KUBELET} /usr/bin/
ENTRYPOINT ["/usr/bin/k3k-kubelet"]