diff --git a/content/guides/dotnet/containerize.md b/content/guides/dotnet/containerize.md index 92219bf0475b..279cc085cdd4 100644 --- a/content/guides/dotnet/containerize.md +++ b/content/guides/dotnet/containerize.md @@ -95,7 +95,7 @@ WORKDIR /source/src RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \ dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app -FROM dhi.io/aspnetcore:10 +FROM dhi.io/aspnetcore:10 AS final WORKDIR /app COPY --from=build /app . ENTRYPOINT ["dotnet", "myWebApp.dll"] diff --git a/content/guides/dotnet/develop.md b/content/guides/dotnet/develop.md index 92929432808e..9ecb5eb26d62 100644 --- a/content/guides/dotnet/develop.md +++ b/content/guides/dotnet/develop.md @@ -182,9 +182,9 @@ $ docker container ls You should see output like the following. ```console -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -cb36e310aa7e docker-dotnet-server "dotnet myWebApp.dll" About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp docker-dotnet-server-1 -39fdcf0aff7b postgres "docker-entrypoint.s…" About a minute ago Up About a minute (healthy) 5432/tcp docker-dotnet-db-1 +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +cb36e310aa7e docker-dotnet-sample-server "dotnet myWebApp.dll" About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp docker-dotnet-sample-server-1 +39fdcf0aff7b postgres:18 "docker-entrypoint.s…" About a minute ago Up About a minute (healthy) 5432/tcp docker-dotnet-sample-db-1 ``` In the previous example, the container ID is `39fdcf0aff7b`. Run the following command to connect to the postgres database in the container. Replace the container ID with your own container ID. @@ -213,7 +213,7 @@ example=# exit ## Verify that data persists in the database -Open a browser and view the application at [http://localhost:8080](http://localhost:8080). You should see a simple web application with the text `Student name is Whale Moby`. +Open a browser and view the application at [http://localhost:8080](http://localhost:8080). You should see a simple web application with the text `Student name is Moby Whale`. Press `ctrl+c` in the terminal to stop your application. @@ -322,7 +322,7 @@ COPY . /source WORKDIR /source/src CMD dotnet run --no-launch-profile -FROM dhi.io/aspnetcore:10 +FROM dhi.io/aspnetcore:10 AS final WORKDIR /app COPY --from=build /app . ENTRYPOINT ["dotnet", "myWebApp.dll"] diff --git a/content/guides/dotnet/run-tests.md b/content/guides/dotnet/run-tests.md index daa78458e613..196a7b6311c6 100644 --- a/content/guides/dotnet/run-tests.md +++ b/content/guides/dotnet/run-tests.md @@ -66,7 +66,7 @@ COPY . /source WORKDIR /source/src CMD dotnet run --no-launch-profile -FROM dhi.io/aspnetcore:10 +FROM dhi.io/aspnetcore:10 AS final WORKDIR /app COPY --from=build /app . ENTRYPOINT ["dotnet", "myWebApp.dll"]