docker container run --publish 80:80 nginx
- Downloaded latest image
nginx
from Docker Hub - Started a new container from that image
- Opened port 80 on the host IP (1st 80)
- Routes that traffic to the container IP, port 80 (2nd 80)
docker container run --publish 80:80 --detach nginx
--detach
tells docker to run it in the background and we get back(it returns) unique container id of our container
docker container ls
- list all containers running
docker container stop
- stops the container
docker container rm -f 675 697 360
- removes container
-f
removes even running container
generatre an adjective and a famouse scientist, e.g. practical_brown
docker container run --publish 80:80 --detach --name webhost nginx
docker container logs webhost -f
webhost
is the container name-f
- tailing
docker container top webhost
process based on configuration
docker container --help