From ea2cf915f1c4cf027efeb288a3a26ac10c22f3c2 Mon Sep 17 00:00:00 2001 From: Rafael Breno <32229014+rafaelbreno@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:37:06 -0300 Subject: [PATCH] clean dir --- Dockerfile.windows | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile.windows b/Dockerfile.windows index 222c2791d5..d32a853236 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -104,11 +104,18 @@ RUN mv CalicoWindows/cni/calico.exe rancher/ RUN mv CalicoWindows/cni/calico-ipam.exe rancher/ RUN mv CalicoWindows/confd confd/ +# New stage to create clean directory structure +FROM alpine:3.20 AS directory-setup +RUN mkdir -p /clean/bin /clean/bin/confd /clean/charts + FROM scratch AS windows-runtime LABEL org.opencontainers.image.url="https://hub.docker.com/r/rancher/rke2-runtime" LABEL org.opencontainers.image.source="https://github.com/rancher/rke2" +# First copy the clean directory structure +COPY --from=directory-setup /clean/ / + # Copy files - directories will be created automatically COPY --from=containerd /usr/local/bin/*.exe /bin/ COPY --from=windows-runtime-collect ./rancher/* /bin/