Skip to content

Commit 93c783b

Browse files
guides: update dotnet (#24810)
<!--Delete sections as needed --> ## Description Tested and updated the dotnet guide. - Add missing stage name for dhi Dockerfile - Clean up some output ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Editorial review Signed-off-by: Craig Osterhout <craig.osterhout@docker.com>
1 parent 911f245 commit 93c783b

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

content/guides/dotnet/containerize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ WORKDIR /source/src
9595
RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
9696
dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app
9797

98-
FROM dhi.io/aspnetcore:10
98+
FROM dhi.io/aspnetcore:10 AS final
9999
WORKDIR /app
100100
COPY --from=build /app .
101101
ENTRYPOINT ["dotnet", "myWebApp.dll"]

content/guides/dotnet/develop.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ $ docker container ls
182182
You should see output like the following.
183183

184184
```console
185-
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
186-
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
187-
39fdcf0aff7b postgres "docker-entrypoint.s…" About a minute ago Up About a minute (healthy) 5432/tcp docker-dotnet-db-1
185+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
186+
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
187+
39fdcf0aff7b postgres:18 "docker-entrypoint.s…" About a minute ago Up About a minute (healthy) 5432/tcp docker-dotnet-sample-db-1
188188
```
189189

190190
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
213213

214214
## Verify that data persists in the database
215215

216-
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`.
216+
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`.
217217

218218
Press `ctrl+c` in the terminal to stop your application.
219219

@@ -322,7 +322,7 @@ COPY . /source
322322
WORKDIR /source/src
323323
CMD dotnet run --no-launch-profile
324324
325-
FROM dhi.io/aspnetcore:10
325+
FROM dhi.io/aspnetcore:10 AS final
326326
WORKDIR /app
327327
COPY --from=build /app .
328328
ENTRYPOINT ["dotnet", "myWebApp.dll"]

content/guides/dotnet/run-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ COPY . /source
6666
WORKDIR /source/src
6767
CMD dotnet run --no-launch-profile
6868

69-
FROM dhi.io/aspnetcore:10
69+
FROM dhi.io/aspnetcore:10 AS final
7070
WORKDIR /app
7171
COPY --from=build /app .
7272
ENTRYPOINT ["dotnet", "myWebApp.dll"]

0 commit comments

Comments
 (0)