mirror of
https://github.com/rancher/k3k.git
synced 2026-08-18 03:46:31 +00:00
Fix Docker COPY paths for goreleaser dockers_v2 platform layout
This commit is contained in:
@@ -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
@@ -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"]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user