Skip to content

Commit

Permalink
undo
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelbreno committed Oct 25, 2024
1 parent cfbd9a1 commit 01e363b
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,10 @@ RUN mv CalicoWindows/cni/calico.exe rancher/
RUN mv CalicoWindows/cni/calico-ipam.exe rancher/
RUN mv CalicoWindows/confd confd/

FROM mcr.microsoft.com/windows/nanoserver:1809 AS windows-runtime
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"

USER ContainerAdministrator
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Create necessary directories
RUN New-Item -ItemType Directory -Force -Path C:\bin, C:\bin\confd, C:\charts

# Copy files using Windows paths
COPY --from=containerd /usr/local/bin/*.exe C:/bin/
COPY --from=windows-runtime-collect ./rancher/* C:/bin/
COPY --from=windows-runtime-collect ./confd/ C:/bin/confd/
COPY --from=windows-runtime-collect ./charts C:/charts/

USER ContainerUser
COPY --from=containerd /usr/local/bin/*.exe /bin/
COPY --from=windows-runtime-collect ./rancher/* /bin/
COPY --from=windows-runtime-collect ./confd/ /bin/confd
COPY --from=windows-runtime-collect ./charts /charts/

0 comments on commit 01e363b

Please sign in to comment.