Skip to content

Commit

Permalink
ensure charts directory exists in Windows runtime image, addressing r…
Browse files Browse the repository at this point in the history
…epetitive bootstrapping (#5187)

Co-authored-by: Harrison <[email protected]>
  • Loading branch information
dereknola and HarrisonWAffel authored Jan 2, 2024
1 parent adcd936 commit 88f8468
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ ENV CNI_PLUGIN_VERSION="v1.1.1"

RUN mkdir -p rancher

# The charts directory is intentionally empty on windows, but its presence is required to address https://github.com/rancher/rke2/issues/5138
RUN mkdir -p charts

# We use the containerd-shim-runhcs-v1.exe binary from upstream, as it apparently can't be cross-built on Linux
COPY Dockerfile ./
RUN CONTAINERD_VERSION=$(grep "rancher/hardened-containerd" Dockerfile | grep ':v' | cut -d '=' -f 2- | grep -oE "([0-9]+)\.([0-9]+)\.([0-9]+)") \
Expand Down Expand Up @@ -101,3 +104,4 @@ FROM scratch AS windows-runtime
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 88f8468

Please sign in to comment.