Skip to main content

Docker (IN PROGRESS)

docker hub

https://hub.docker.com/

docker pull linux:version

docker images

docker run -it (run and interact) imagename /bin/bash

commit a image

docker ps -a

docker commit $ID $NAME

docker rm $ID

docker rmi $ID

docker run --name my_name -d -p 80:80 -v /data/websites:/var/www
(-v = volume, -p = port, -d = detach)

docker rm $(docker ps -a -f status=exited -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)

docker volume ls

docker save -o <save image to path> <image name>
docker load -i <path to image tar file>