microsoft / Windows-Containers

Welcome to our Windows Containers GitHub community! Ask questions, report bugs, and suggest features -- let's work together.
MIT License
413 stars 64 forks source link

RUN --mount support in Windows BuildKit #498

Open dev-adi-github-nuitka opened 4 months ago

dev-adi-github-nuitka commented 4 months ago

The following comment written in the issue for adding Windows BuildKit support indicated that in the future, we might be able to expect support for caching RUN steps via the --mount option. However, I am still unable to use the --mount option for RUN commands in Windows. Is support for this planned?


A very quick poke around suggests this failure is coming from hcsshim, which at that point does not appear to be ready to accept a windows-layer mount to a mount-point in the container

That is correct, currently Windows only supports mounting physical/virtual devices and named pipes/host folders via VSMB. The default mount type on Linux when none is explicitly specified is bind. On Windows it's windows-layer. While bind mounts on Linux are common place and can be used in any number, on Windows, windows-layer have only ever been used as root filesystem mounts.

It may suffice to allow setting the mount type in llb state. But I have not looked too much into it. Will have a look soon. I suspect we'll hit this issue when enabling tests as well.

For me, the next step (with no particular timeframe) was to run-up the BuildKit integration tests and see what works and what doesn't.

That is already being worked on by @profnandaa (see https://github.com/moby/buildkit/pull/4432) and there should be a number of PRs incoming that will at least hook up the test suite to the CI and lay the ground for enabling tests (some will already be enabled, some should run but require support - images, windows specific testing Dockerfiles, etc).

Originally posted by @gabriel-samfira in https://github.com/microsoft/Windows-Containers/issues/34#issuecomment-1845181566

profnandaa commented 4 months ago

Cross-linking https://github.com/moby/buildkit/issues/4837

microsoft-github-policy-service[bot] commented 3 months ago

This issue has been open for 30 days with no updates. @profnandaa, please provide an update or close this issue.

profnandaa commented 3 months ago

Still on the backlog, will update when we have something working.

microsoft-github-policy-service[bot] commented 2 months ago

This issue has been open for 30 days with no updates. @profnandaa, please provide an update or close this issue.

profnandaa commented 2 months ago

Still on the backlog.

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been open for 30 days with no updates. @profnandaa, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 4 days ago

This issue has been open for 30 days with no updates. @profnandaa, please provide an update or close this issue.