docker frequent used commends

description: docker commends - not finished yet

check all running proceses/containers

1
docker ps -a

delete a container

1
docker rm container_name

see all images

1
docker images

remove an image

1
docker rmi image_name

Stop all running containers

1
docker stop $(docker ps -a -q)

commit container as a new image

1
2
docker commit new_image_name
docker commit old_image new_image

mount host directory in docker container

1
2
# mount code folder under current folder into the html folder within the Nginx image
docker run -v $PWD/code:/var/www/html Nginx

more on search4fan.github.io