-
Notifications
You must be signed in to change notification settings - Fork 10
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
Windows containers with .NET 4.8 #7
Comments
What is your use-case requiring to use ASP.NET Note that ASP.NET |
Yes, I understand. My question was to try to create an option so that whoever is using it can choose whether to use NET 7 (STS), NET 8 (Preview) or even NET Framework 4.8 with windows container, |
I understand better. I arbitrarily chose to install the LTS non SDK version of ASNP.NET. Because :
I advise you to hard-code the framework version you want to use, in your pipeline. With this setup, the developer controls its environment, not the platform. If they decide to upgrade, they update the pipeline, if not, not. This is under the responsibility of the developer. The framework can be installed on the fly with UseDotNet@2: - task: UseDotNet@2
inputs:
packageType: sdk
version: 7.0.5 Would this answer your first question? Then for Windows container, can you describe your use case? |
It's a scenario for legacy systems, but the solution is currently running on: The pipeline of this legacy system is on "one machine", does not scale and has poor performance The idea is to use AzureDevOps, this solution to compile using Kubernetes with containers (windows). |
I understand better your use case. I started to develop a Windows based container. Work is done in the branch feat/win-container. There are two flavors, Server 2019 and Server 2022. Specify this configuration to require Pods to run on Windows nodes: # values.yaml
nodeSelector:
"kubernetes.io/os": windows Can you test one of these builds and give me a feedback? |
In the first test, there was a problem in Status ContainerCreating: Normal Warning Tomorrow I will continue the tests, thanks for the support. |
Seems to come from an incompatibility with the default Can you test this configuration: # values.yaml
nodeSelector:
kubernetes.io/os: windows
image:
flavor: win-ltsc2022
securityContext:
# Windows containers doesn't support "runAsUser" command, it makes the pod fail to start.
# See: https://github.com/aws/aws-node-termination-handler/issues/595#issuecomment-1054179123
runAsUser: null
windowsOptions:
runAsUserName: ContainerAdministrator |
That worked, but now another problem: Normal Warning Failed Kubernetes version: 1.26 I'm reading these two possible solutions: |
|
Failed to pull image "ghcr.io/clemlesne/azure-pipelines-agent:win-ltsc2022-4.16.1-6.bd1fa92": rpc error: code = Unknown desc ││ = failed to pull and unpack image "ghcr.io/clemlesne/azure-pipelines-agent:win-ltsc2022-4.16.1-6.bd1fa92" failed to extract layer sha256:1c3e131b426750f22e3542b89e73a111f9586c300d8858d97e940aba07753e39: ││ link /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/172/fs/Files/Program Files/Common Files/System/ado/en-US/msader15.dll.mui /var/lib/containerd/io.containerd.snapshotter.v1.overlayf ││ s/snapshots/172/fs/Files/Program Files (x86)/Common Files/System/ado/en-US/msader15.dll.mui: no such file or directory: unknown |
Which version of Windows Server are you using for your host? |
Node group setup : AMI WINDOWS_CORE_2022_x86_64 |
With the variable isWindows=true Status: CreaterContainerError Warning Failed 88s kubelet Error: failed to create containerd container: rootpath on mountPath C:\Windows\TEMP\ctd-volume3851909698\300, volume \app-ro ││ ot\azp-work: readlink C:\Windows\TEMP\ctd-volume3851909698\300: The system cannot find the path specified. Warning Failed 63s (x2 over 75s) kubelet (combined from similar events): Error: secret "azp-agent-azure-pipelines-agent" not found ││ Normal Pulled 48s (x11 over 3m2s) kubelet Container image "ghcr.io/clemlesne/azure-pipelines-agent:win-ltsc2022-4.16.1-6.bd1fa92" already present on machine ││ Warning Failed 48s kubelet Error: secret "azp-agent-azure-pipelines-agent" not found |
I noticed .NET Framework Runtime is not packaged by default on the Windows containers. As .NET is required by the Azure Pipelines Agent, this is surely related. Fix pushed: 9046977. Image: |
I got this error again, I'm checking if I forgot something or if it could be some cache: Failed |
Can you test the Helm chart from a2a9b00 to deploy the service? |
I didn't have much time to dedicate, but:
However, I had problems using some things from the newer C# (something related to the msbuild version) and I stopped at the buildkitd and buildctl build part... I wanted something that was very similar to how it is done in linux. Maybe tomorrow I can work more on this pipeline. There is a scenario where I can build\publish on windows. Then I use another linux agent to get these files and using the buildkit to generate a docker windows image. I still don't know what the best strategy will be Thank you so much for your effort and dedication |
I squashed my commits and added zstd in the Windows build. I'm merging the branch, I propose you to re-open an issue for future needs, to simplify my workload. Thank you for participating in the project! Be warning, I'm releasing this in the v5.0.0, it contains some breaking changes in the Helm values (not that much I reassure you). Build containers in the agent: I updated the documentation for container build in the agent. This is not supported at the time by any component I'm aware of, sadly. What I can advise you is:
|
Is it possible to create an option where I can choose whether I want an aspnet6 or aspnet7 docker image?
FROM mcr.microsoft.com/dotnet/aspnet:7.0-jammy as base
Or in another scenario Net Framework 4.8 with windows image...
The text was updated successfully, but these errors were encountered: