Improve step to show content of the data.txt

Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
This commit is contained in:
Stefan Scherer 2020-05-17 17:51:12 +02:00
parent b9fe2cd927
commit 9864607e6b
No known key found for this signature in database
GPG Key ID: 505AF50C5D02E697
2 changed files with 13 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View File

@ -25,8 +25,19 @@ What you'll see is that the files created in one container aren't available in a
commands (why we have the `&&`). The first portion picks a single random number and writes commands (why we have the `&&`). The first portion picks a single random number and writes
it to `/data.txt`. The second command is simply watching a file to keep the container running. it to `/data.txt`. The second command is simply watching a file to keep the container running.
1. Validate we can see the output by `exec`'ing into the container. To do so, you need to get the 1. Validate we can see the output by `exec`'ing into the container. To do so, open the Dashboard and click the first action of the container that is running the `ubuntu` image.
container's ID (use `docker ps` to get it).
![Dashboard open CLI into ubuntu container](dashboard-open-cli-ubuntu.png){: style=width:75% }
{: .text-center }
You will see a terminal that is running a shell in the ubuntu container. Run the following command to see the content of the `/data.txt` file. Close this terminal afterwards again.
```bash
cat /data.txt
```
If you prefer the command line you can use the `docker exec` command to do the same. You need to get the
container's ID (use `docker ps` to get it) and get the content with the following command.
```bash ```bash
docker exec <container-id> cat /data.txt docker exec <container-id> cat /data.txt