Skip to content

Use .Net 7 SDK as base image#2419

Closed
joshendriks wants to merge 1 commit into
microsoft:mainfrom
joshendriks:main
Closed

Use .Net 7 SDK as base image#2419
joshendriks wants to merge 1 commit into
microsoft:mainfrom
joshendriks:main

Conversation

@joshendriks
Copy link
Copy Markdown

As a followup for both #2411 and #2410

Context:
I am using this image as part of a bitbucket pipeline where Is execute "xUnit driven playwright test" as follows:

image: nwwz/playwright-dotnet:v1.28.0-net7-jammy
       caches:
        - dotnetcore
       script:
        - dotnet dev-certs https --clean
        - dotnet dev-certs https --trust
        - export TESTCONTAINERS_RYUK_DISABLED=true
        - dotnet restore
        - cd tests/End2EndTests
        - dotnet test
       services:
        - docker

I had to replace the official playwright image (mcr.microsoft.com/playwright/dotnet:v1.27.0-focal) with my own (nwwz/playwright-dotnet:v1.28.0-net7-jammy) as part of migrating my app to .NET 7.

nwwz/playwright-dotnet:v1.28.0-net7-jammy was built using the same change as made in this PR.

@mxschmitt
Copy link
Copy Markdown
Contributor

Playwright uses the current .NET LTS inside the Docker image which is currently .NET 6. (https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)

I recommend to build your own Docker image or use the official one and "inherit" from it via FROM and install your custom .NET version in it.

@mxschmitt mxschmitt closed this Dec 6, 2022
@joshendriks
Copy link
Copy Markdown
Author

joshendriks commented Dec 6, 2022

I assume you mean the current latest LTS? At the time of writing .NET Core 3.1 is still a current LTS. As of nov 2023 we will again be in that situation where there are two versions in LTS.

Regardless, I do think it makes sense to also support .NET 7. It is fully supported and production ready. Also, .NET 7 projects do not build on .NET 6. The otherway around does work. So having .NET 7 would give a broader support to the users.

Both of the above reasons might be enough of a justification to support multiple .NET versions. @mxschmitt: Would you like me to create an issue to dicuss it there or would your statement above remain the same?

@mxschmitt
Copy link
Copy Markdown
Contributor

Yes you are right, I assume the latest LTS.

Definitely it makes sense to have a more rich matrix for different .net versions across the Docker images. Feel free to file a feature request as an issue, then we can do it based on the user requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants