Use -d (detach), --name, -p (port).
For long-running services you want `-d` (detach), a
`--name` to address it later, and `-p HOST:CONTAINER` to publish a port.
TASK
----
Run:
docker run -d --name web -p 8080:80 nginx
Pass when the output contains an ID (a long hex string) — anything works
as long as a container is started.
TIP: Without `-d`, your terminal would stay attached to the container's
stdout. Useful for debugging, terrible for daemons.
Sign in to save your code and track progress across devices.