-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit support for Windows containers #117
Comments
Testing this requires specifying an explicit base image name, a good example is |
@baronfel The branch builds on top of #323 which is a prerequisite. Here the relevant commit/diff. The main changes I added are similar as described in the initial post of this issue:
When writing some unit tests for the Layer structure I ran into a bug in the TarReader and likely the GitHub Actions need extension to run certain tests on a Windows environment. So overall it is rather a functional PoC than something that can be merged as it is. Example run of the latest state. There you can see a publish of the same console app (with nothing special defined beside the nuget installed) being published first as linux image, then as windows image and both are running outputting the OS information. |
This is great stuff! You're right that GitHub actions' windows runners don't include Docker (due to licensing) - this is why all of the RID-permutation tests are commented out save linux-x64. I'm not sure if MSTest has the equivalent of conditional theories or facts - I would really love to lean into making a data-driven XUnit Fact for example that could probe the environment and determine to skip a test or not. The changes to TAR layout overall in that diff look good to me, and of course tests are always a great help to bring confidence in changes :) |
@baronfel What do you think would be the minimal implementations to ship an experimental support in one of the next releases? I am thinking of preparing some PR which brings in some essential changes for an early access feature. Personally I am concerned about the automatic testing strategy. Some things we can likely test against "best knowledge" or "specification" (e.g. the layer structure) but not against a real docker/container env. |
@Danielku15 I would be very happy to bring in anything along the lines of the delta you had on your other branch - we're starting work on absorbing this repo into the .NET SDK, and part of that work is moving to dedicated Azure DevOps runners for CI, and those runners do have Docker available on Windows machines/Windows machines that support running containers. When we do that we'd 'light up' specific test runs to verify that Windows containers are able to be authored by this tooling, and that Windows Container Runtimes are able to run the Windows Containers generated from this tooling. Does that make sense? |
Great then I will soon-ish start preparing a PR with at least the essential changes and some basic unit tests around the layer structure (to ensure this part doesn't break). I will not invest much at this point into an integration level test which would touch a container runtime. |
Going to close this as @Danielku15 has implemented support for Windows Containers back in Februrary. Thanks @Danielku15! |
When building a container for Windows we'll likely need:
The text was updated successfully, but these errors were encountered: