diff --git a/content/guides/dotnet/deploy.md b/content/guides/dotnet/deploy.md index ed1b464e95..837917a0ba 100644 --- a/content/guides/dotnet/deploy.md +++ b/content/guides/dotnet/deploy.md @@ -64,7 +64,7 @@ spec: name: server imagePullPolicy: Always ports: - - containerPort: 80 + - containerPort: 8080 hostPort: 8080 protocol: TCP resources: {} @@ -117,7 +117,7 @@ spec: ports: - name: "8080" port: 8080 - targetPort: 80 + targetPort: 8080 nodePort: 30001 selector: service: server diff --git a/content/guides/dotnet/develop.md b/content/guides/dotnet/develop.md index 3c8ecf1ad5..d5bea5491f 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->80/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-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 ``` 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. @@ -241,7 +241,7 @@ services: context: . target: final ports: - - 8080:80 + - 8080:8080 depends_on: db: condition: service_healthy @@ -337,14 +337,14 @@ ENTRYPOINT ["dotnet", "myWebApp.dll"] The following is the updated `compose.yaml` file. -```yaml {hl_lines="5"} +```yaml {hl_lines=[5,15,16]} services: server: build: context: . target: development ports: - - 8080:80 + - 8080:8080 depends_on: db: condition: service_healthy @@ -354,7 +354,6 @@ services: path: . environment: - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://+:80' db: image: postgres restart: always