- Added a check to exclude Windows OS when adding bind mount types to container image bundle.
- Bind types apply to Linux OS; hcsshim accepts empty bind types for Windows container creation.
[#4892 ](https://github.com/moby/buildkit/issues/4892)
More info, what I was trying to achieve
I attempted to build a custom Docker frontend image(resides in dockerhub:docker.io/100909/dockerfile-4892) using the following Dockerfile:
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 AS release
LABEL moby.buildkit.frontend.network.none="true"
LABEL moby.buildkit.frontend.caps="moby.buildkit.frontend.inputs,moby.buildkit.frontend.subrequests,moby.buildkit.frontend.contexts"
COPY /dockerfile-frontend.exe /bin/dockerfile-frontend.exe
ENTRYPOINT ["/bin/dockerfile-frontend.exe"]
FROM release
The dockerfile-frontend.exe was built from buildkit/frontend/dockerfile/cmd/dockerfile-frontend.
I created another Dockerfile referencing the custom frontend image:
More info, what I was trying to achieve
I attempted to build a custom Docker frontend image(resides in dockerhub:docker.io/100909/dockerfile-4892) using the following Dockerfile:
The
dockerfile-frontend.exe
was built frombuildkit/frontend/dockerfile/cmd/dockerfile-frontend
.I created another Dockerfile referencing the custom frontend image:
I ran the following command:
This resulted in an error during container creation in
hcsshim
:I made changes in BuildKit to fix the error in step 3 and ran
buildctl
again.Container creation stage passes,
I am getting a new error shown below when building the custom dockerfile frontend as in step 2.
This commit fixes the error in step 3. @tonistiigi I am seeking ideas and comments.