docker container run --publish 80:80 nginx
  • pulls latest image from docker hub
  • starts new container using latest image
  • opened port 80
  • routes traffic from localhost:80

list containers

docker container ls [-a]

stop container

docker container stop <container_id>
  • only need first few characters of container id

view container logs

docker container logs <container_name>

display running processes

docker container top <container_name>