Skip to content

Commit

Permalink
ensure charts directory exists in wins runtime image, addressing repe…
Browse files Browse the repository at this point in the history
…titive bootstrapping (#5185)

Co-authored-by: Harrison <harrisonaffel@gmail.com>
  • Loading branch information
dereknola and HarrisonWAffel committed Jan 3, 2024
1 parent 58eb7a3 commit f95e1a2
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 f95e1a2

Please sign in to comment.