-
Notifications
You must be signed in to change notification settings - Fork 2k
Update samples to .NET 8 #4742
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
Merged
Merged
Update samples to .NET 8 #4742
Changes from 42 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
3c97828
Update dotnetapp sample to .NET 8
richlander a0a73f8
Update ASP.NET sample
richlander 71e0059
Update
richlander fdd1d3b
Update Windows samples
richlander b8913bf
Switch aspnetapp to chiseled
richlander 6b713fc
Add apiapp
richlander 3c97503
Add AOT and single file samples
richlander bfd5ac7
Update manifest.samples.json
richlander f855ea1
Update manifest
richlander 0f5c025
Add cross-target sample
richlander 6104c2e
Update cross-target Dockerfile
richlander 764f30d
Change image reference
richlander b538842
Add build-essential package
richlander 23cb595
Add more SF variants
richlander 55faf5c
Update README
richlander 37ffee7
Update READMEs
richlander e7e9ee6
Enable buildkit on agent
lbussell 445fe0f
Merge branch 'main' into dotnet-8-samples
lbussell 609f130
Escape powershell variable definition in bash
lbussell 77b8e0e
Apply suggestions from code review
richlander b526676
Update per feedback
richlander f83c4dc
Add cross-target Dockerfiles
richlander 2a04031
Update README
richlander 21956e2
Fix markdown
richlander 14bc38d
Update README.md
richlander 7c56874
Fix Ubuntu feeds
richlander 669c1b6
Add cbl-mariner Dockerfile
richlander cf0e567
Add Mariner to README
richlander 0a46215
Remove compiler reference
richlander ff62974
Switch to chiseled
richlander e43e109
Add instructions for SDK container builds
richlander 90e420d
Add announcements
richlander e4c4088
Add announcements
richlander c12ce07
Remove announcements
richlander 09e21de
Update to alpine 3.18 based ImageBuilder
lbussell 52e53b2
Merge remote-tracking branch 'upstream/main' into dotnet-8-samples
lbussell adbbfe8
Remove ContainerUser from IIS sample
richlander 58ee815
Update sample data
richlander b759c59
Update default port
lbussell 2625383
Update port env var
lbussell 15d0338
Use port 80 for ServiceMonitor.exe
lbussell d89c393
Merge branch 'main' into dotnet-8-samples
mthalman 6f59d02
Update to new images
richlander d1c0835
Update samples/dotnetapp/README.md
richlander 4c058c1
Update samples
richlander b4538af
Merge branch 'main' into dotnet-8-samples
richlander e891465
Merge remote-tracking branch 'upstream/main' into dotnet-8-samples
lbussell d3682bd
Update complex app to net8.0 TFM
lbussell 6956662
Update globalapp to net8.0 TFM
lbussell 5b7a5d3
Update more complexapp TFMs
lbussell 22b55d3
Update READMEs
richlander b44093a
Use platform specific windows server version for complex app test
lbussell 1f5aa1f
Revert "Use platform specific windows server version for complex app …
lbussell fdc8ef9
Disable test on Windows
lbussell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,5 @@ | ||||||
variables: | ||||||
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2230260 | ||||||
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2233114 | ||||||
|
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2233114 | |
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2240150 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
# Learn about building .NET container images: | ||
# https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview AS build | ||
|
||
ARG TARGETARCH | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore --use-current-runtime | ||
RUN dotnet restore -a $TARGETARCH | ||
|
||
# copy everything else and build app | ||
# copy and publish app and libraries | ||
COPY aspnetapp/. . | ||
RUN dotnet publish --use-current-runtime --self-contained false --no-restore -o /app | ||
RUN dotnet publish -a $TARGETARCH --no-restore -o /app | ||
|
||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview | ||
WORKDIR /app | ||
COPY --from=build /app . | ||
ENTRYPOINT ["dotnet", "aspnetapp.dll"] | ||
USER $APP_UID | ||
ENTRYPOINT ["./aspnetapp"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
# Learn about building .NET container images: | ||
# https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build | ||
|
||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview-alpine AS build | ||
ARG TARGETARCH | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore --use-current-runtime | ||
RUN dotnet restore -a $TARGETARCH | ||
|
||
# copy everything else and build app | ||
# copy and publish app and libraries | ||
COPY aspnetapp/. . | ||
RUN dotnet publish --use-current-runtime --self-contained false --no-restore -o /app | ||
RUN dotnet publish -a $TARGETARCH --no-restore -o /app | ||
|
||
|
||
# Enable globalization and time zones: | ||
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md | ||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview-alpine | ||
WORKDIR /app | ||
COPY --from=build /app . | ||
USER $APP_UID | ||
ENTRYPOINT ["./aspnetapp"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed anymore.