Docker (IN PROGRESS)
docker hub
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 stop $(docker ps -a -q)
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>
Start containers automatically
systemctl enable docker
docker run -dit --restart unless-stopped nginx
docker exec -it nginx bash
docker top nginx