Skip to content

Commit

Permalink
Address many other open and related issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Jan 7, 2025
1 parent 4cee5aa commit 34ea656
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 140 deletions.
3 changes: 3 additions & 0 deletions docs/core/docker/build-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ Create a file named _Dockerfile_ in the directory containing the _.csproj_ and o
:::zone-end

> [!IMPORTANT]
> Including a secure hash algorithm (SHA) after the image tag in a _Dockerfile_ is a best practice. This ensures that the image is not tampered with and that the image is the same as the one you expect. The SHA is a unique identifier for the image. For more information, see [Docker Docs: Pull an image by digest](https://docs.docker.com/reference/cli/docker/image/pull/#pull-an-image-by-digest-immutable-identifier).
> [!TIP]
> This _Dockerfile_ uses multi-stage builds, which optimize the final size of the image by layering the build and leaving only required artifacts. For more information, see [Docker Docs: multi-stage builds](https://docs.docker.com/build/building/multi-stage/).
Expand Down
196 changes: 139 additions & 57 deletions docs/core/docker/publish-as-container.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/core/docker/snippets/8.0/App/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
RUN dotnet publish -c Release --property:PublishDir=out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0@sha256:6c4df091e4e531bb93bdbfe7e7f0998e7ced344f54426b7e874116a3dc3233ff
Expand Down
2 changes: 1 addition & 1 deletion docs/core/docker/snippets/9.0/App/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
RUN dotnet publish -c Release --property:PublishDir=out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:9.0@sha256:b4bea3a52a0a77317fa93c5bbdb076623f81e3e2f201078d89914da71318b5d8
Expand Down
7 changes: 0 additions & 7 deletions docs/core/docker/snippets/9.0/Worker/Program.cs

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions docs/core/docker/snippets/9.0/Worker/Worker.cs

This file was deleted.

19 changes: 0 additions & 19 deletions docs/core/docker/snippets/9.0/Worker/Worker.csproj

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions docs/core/docker/snippets/9.0/Worker/appsettings.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>dotnet-DotNet.ContainerImage-2e40c179-a00b-4cc9-9785-54266210b7eb</UserSecretsId>
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 34ea656

Please sign in to comment.