k8s.io/kubernetes@v1.29.3/test/images/windows/powershell-helper/Dockerfile (about) 1 # Copyright 2020 The Kubernetes Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 ARG SOURCE 16 17 # NOTE(claudiub): The src image is already based on nanoserver, but it seems that docker buildx 18 # has an issue pulling cross-registry images, and we avoid that by pulling it ourselves. 19 FROM --platform="windows/amd64" mcr.microsoft.com/windows/nanoserver:1809 as nanoserver 20 FROM --platform="windows/amd64" $SOURCE as src 21 FROM scratch 22 23 # NOTE(claudiub): We're basically forcing docker buildx to finish pulling the nanoserver image 24 # before continuing with the rest of this Dockerfile. 25 COPY --from=nanoserver /License.txt /License.txt 26 27 COPY --from=src /PowerShell /PowerShell 28 COPY --from=src /Users/ContainerAdministrator/AppData/Local/Microsoft/Windows/PowerShell/docker/ModuleAnalysisCache /Users/ContainerAdministrator/AppData/Local/Microsoft/Windows/PowerShell/docker/ModuleAnalysisCache