# Learn Docker: Run a Container ![rw-book-cover](https://api.boot.dev/v1/static/course_image/learn-docker) ## Metadata - Author: [[boot.dev]] - Full Title: Learn Docker: Run a Container - Category: #articles - Summary: The Bootdev CLI is needed to submit your solution for this lesson. It runs commands in your environment to check your work. You must install Go and the CLI from GitHub to use it. - URL: https://www.boot.dev/lessons/64e612f6-15eb-443c-87e9-ab0983fcd50b ## Highlights - # this is just an example, don't run this docker run -d -p hostport:containerport namespace/name:tag • `-d`: Run in detached mode (doesn't block your terminal) • `-p`: Publish a container's port to the host (forwarding) • `hostport`: The port on your local machine • `containerport`: The port inside the container • `namespace/name`: The name of the image (usually in the format `username/repo`) • `tag`: The version of the image (often `latest`) ([View Highlight](https://read.readwise.io/read/01km6n5dqcevmafd3eqcns9zy7))