diff --git a/DockerfileWindows b/DockerfileWindows index da49aa3ed..594ebd145 100644 --- a/DockerfileWindows +++ b/DockerfileWindows @@ -12,8 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG BASEIMAGE -FROM ${BASEIMAGE} +ARG VERSION +FROM mcr.microsoft.com/windows/servercore:$VERSION as core +FROM mcr.microsoft.com/windows/nanoserver:$VERSION +COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll ADD build/windows/amd64/sonobuoy.exe /sonobuoy.exe WORKDIR / diff --git a/scripts/build_funcs.sh b/scripts/build_funcs.sh index 63bf8ca0f..358c10faa 100755 --- a/scripts/build_funcs.sh +++ b/scripts/build_funcs.sh @@ -85,13 +85,12 @@ build_container_dockerfile_arch() { } buildx_container_windows_version(){ - BASEIMAGE="$WIN_AMD64_BASEIMAGE:$1" mkdir -p "build/windows/$WIN_ARCH/$VERSION" docker buildx build --pull \ --output=type=oci,dest=build/windows/$WIN_ARCH/$VERSION/sonobuoy-img-win-$WIN_ARCH-$VERSION-$GITHUB_RUN_ID.tar \ --platform windows/amd64 \ -t $REGISTRY/$TARGET:win-$WIN_ARCH-$VERSION-$IMAGE_VERSION \ - --build-arg BASEIMAGE=$BASEIMAGE \ + --build-arg VERSION=$1 \ -f build/windows/$WIN_ARCH/Dockerfile \ . }