Skip to content

Commit

Permalink
update get started (#18876)
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Osterhout <[email protected]>
  • Loading branch information
craig-osterhout authored Dec 8, 2023
1 parent 019a9f7 commit 466d833
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions content/get-started/02_our_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,16 @@ Now that you have an image, you can run the application in a container using the
```

The `-d` flag (short for `--detach`) runs the container in the background.
The `-p` flag (short for `--publish`) creates a port mapping between the host and the container.
The `-p` flag takes a string value in the format of `HOST:CONTAINER`,
where `HOST` is the address on the host, and `CONTAINER` is the port on the container.
The command publishes the container's port 3000 to `127.0.0.1:3000` (`localhost:3000`) on the host.
Without the port mapping, you wouldn't be able to access the application from the host.
This means that Docker starts your container and returns you to the terminal
prompt. You can verify that a container is running by viewing it in Docker
Dashboard under **Containers**, or by running `docker ps` in the terminal.

The `-p` flag (short for `--publish`) creates a port mapping between the host
and the container. The `-p` flag takes a string value in the format of
`HOST:CONTAINER`, where `HOST` is the address on the host, and `CONTAINER` is
the port on the container. The command publishes the container's port 3000 to
`127.0.0.1:3000` (`localhost:3000`) on the host. Without the port mapping,
you wouldn't be able to access the application from the host.

2. After a few seconds, open your web browser to [http://localhost:3000](http://localhost:3000).
You should see your app.
Expand Down

0 comments on commit 466d833

Please sign in to comment.