Skip to content

Publish .NET app some rewording #42760

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/core/docker/build-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ If you pass a number on the command line to the app, it will only count up to th

## Publish .NET app

Before adding the .NET app to the Docker image, first it must be published. It's best to have the container run the published version of the app. To publish the app, run the following command:
In order for the application to be suitable for an image creation it has to be built. `dotnet publish` command is most apt for this. For in-depth reference, see [dotnet build](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build) and [dotnet publish](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish) commands documentation.

```dotnetcli
dotnet publish -c Release
Expand All @@ -141,6 +141,9 @@ This command compiles your app to the *publish* folder. The path to the *publish

This command compiles your app to the *publish* folder. The path to the *publish* folder from the working folder should be `.\App\bin\Release\net7.0\publish\`.

> [!NOTE]
> Application publishing is needed for image creation but this is rather orchestrated by the _Dockerfile_. See [Create the Dockerfile](#create-the-dockerfile).

:::zone-end

#### [Windows](#tab/windows)
Expand Down
Loading