Skip to content

Commit

Permalink
chore: fix windows pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed May 2, 2022
1 parent 912ddfd commit c6b7c1a
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions cmd/smbplugin/Dockerfile.Windows
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
ARG OSVERSION
ARG ARCH=amd64
FROM --platform=linux/${ARCH} gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-${ARCH}-${OSVERSION} as core
# Copyright 2022 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM mcr.microsoft.com/windows/nanoserver:${OSVERSION}
# these arguments come from BUILD_PLATFORMS used in release-tools
ARG ADDON_IMAGE=servercore:1809
ARG BASE_IMAGE=nanoserver:1809
ARG REGISTRY=mcr.microsoft.com/windows

FROM ${REGISTRY}/${ADDON_IMAGE} as addon
FROM ${REGISTRY}/${BASE_IMAGE}
LABEL description="CSI SMB plugin"

ARG ARCH=amd64
ARG binary=./_output/${ARCH}/smbplugin.exe
COPY ${binary} /smbplugin.exe
COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll
COPY --from=addon /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll

USER ContainerAdministrator
ENTRYPOINT ["/smbplugin.exe"]

0 comments on commit c6b7c1a

Please sign in to comment.