|
1 | | -ARG OSVERSION |
2 | | -ARG ARCH=amd64 |
3 | | -FROM --platform=linux/${ARCH} gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-${ARCH}-${OSVERSION} as core |
| 1 | +# Copyright 2022 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 | +# these arguments come from BUILD_PLATFORMS used in release-tools |
| 16 | +ARG ADDON_IMAGE=servercore:1809 |
| 17 | +ARG BASE_IMAGE=nanoserver:1809 |
| 18 | +ARG REGISTRY=mcr.microsoft.com/windows |
4 | 19 |
|
5 | | -FROM mcr.microsoft.com/windows/nanoserver:${OSVERSION} |
| 20 | +FROM ${REGISTRY}/${ADDON_IMAGE} as addon |
| 21 | +FROM ${REGISTRY}/${BASE_IMAGE} |
6 | 22 | LABEL description="CSI SMB plugin" |
7 | 23 |
|
8 | 24 | ARG ARCH=amd64 |
9 | 25 | ARG binary=./_output/${ARCH}/smbplugin.exe |
10 | 26 | COPY ${binary} /smbplugin.exe |
11 | | -COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll |
| 27 | +COPY --from=addon /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll |
| 28 | + |
12 | 29 | USER ContainerAdministrator |
13 | 30 | ENTRYPOINT ["/smbplugin.exe"] |
0 commit comments