- looks for image locally
- if not locally pulls to from repo (default docker hub)
- downloads latest version by default
- creates new container
- gives a virt ip on private network inside docker engine
- opens up port 80 on host and forwards to port 80 in container
- starts container using the CMD in the image dockerfile
docker container run --publish 8080:80 --name webhost -d nginx:1.11 nginx -T
- change host listening port to
8080
- change version of image to
1.11
- change CMD run on start with
-T