Use `docker run` to create and start a container from an image. It is a quick way to test a packaged microservice locally before publishing it, or to check that a published image can start. section 3.8.3 section 3.9.3
Start a local microservice
Run `docker run -d -p 3000:3000 -e PORT=3000 video-streaming`. The `-d` flag runs it in the background; omit it to see output in the terminal. `-p` forwards host port 3000 to container port 3000, while `-e` sets the service’s `PORT` environment variable. Docker prints a container ID. Use `docker container list` to find it later and `docker logs <container-id>` to inspect its output. Then test the service at `http://localhost:3000/video`. section 3.8.3
The image name can also identify an image in a remote registry. After publishing, run `docker run -d -p 3000:3000 -e PORT=3000 bmdk1.azurecr.io/video-streaming:latest` to test the published image on your development computer. To verify that Docker pulls it from the registry rather than using a cached local copy, first stop and remove containers created from the local image, then remove that image. Containers can otherwise keep running and consuming resources. section 3.9.3



