Skip to content

Commit 17ad45f

Browse files
authored
Merge pull request #471 from andyzhangx/fix-windows-pipeline
chore: fix windows pipeline
2 parents 912ddfd + 2bb3d92 commit 17ad45f

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

cmd/smbplugin/Dockerfile.Windows

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
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
419

5-
FROM mcr.microsoft.com/windows/nanoserver:${OSVERSION}
20+
FROM ${REGISTRY}/${ADDON_IMAGE} as addon
21+
FROM ${REGISTRY}/${BASE_IMAGE}
622
LABEL description="CSI SMB plugin"
723

824
ARG ARCH=amd64
925
ARG binary=./_output/${ARCH}/smbplugin.exe
1026
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+
1229
USER ContainerAdministrator
1330
ENTRYPOINT ["/smbplugin.exe"]

0 commit comments

Comments
 (0)