$ docker run -it --rm -p 8080:80 nginx
$ docker build -t myimg .
$ docker build -t app:1.0 --no-cache --build-arg VERSION=1 .
| -d | detached — run in the background |
| -it | interactive with a terminal attached |
| -i | keep STDIN open (interactive) |
| -t | allocate a pseudo-terminal |
| -p | publish a container port to the host (host:container) |
| -v | mount a volume (host path : container path) |
| -e | set an environment variable |
| -w | set the working directory inside the container |
| --rm | remove the container when it exits |
| --name | give the container a name |
| --network | connect the container to this network |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.