You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update Dotnet Containerization Docs
This is a condensed version of the two separate commands to connect to the docker container and to log into postgres.
* Update exit commands
Copy file name to clipboardExpand all lines: content/language/dotnet/develop.md
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,16 +182,10 @@ cb36e310aa7e docker-dotnet-server "dotnet myWebApp.dll" About a minute ag
182
182
39fdcf0aff7b postgres "docker-entrypoint.s…" About a minute ago Up About a minute (healthy) 5432/tcp docker-dotnet-db-1
183
183
```
184
184
185
-
In the previous example, the container ID is `39fdcf0aff7b`. Run the following command to start a bash shell in the postgres container. Replace the container ID with your own container ID.
185
+
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.
186
186
187
187
```console
188
-
$ docker exec -it 39fdcf0aff7b bash
189
-
```
190
-
191
-
Then run the following command to connect to the database.
192
-
193
-
```console
194
-
postgres@39fdcf0aff7b:/$ psql -d example -U postgres
188
+
$ docker exec -it 39fdcf0aff7b psql -d example -U postgres
195
189
```
196
190
197
191
And finally, insert a record into the database.
@@ -206,11 +200,10 @@ You should see output like the following.
206
200
INSERT 0 1
207
201
```
208
202
209
-
Close the database connection and exit the container shell by running `exit` twice.
203
+
Close the database connection and exit the container shell by running `exit`.
0 commit comments