Docker commandes
Lancer Docker Web :
docker run -d -v /home/XXX/www/:/var/www/ -p 80:80 --link XXX_database3_1 --link XXX_unrealircd3_1 root_site3_1
Pour supprimer l'ensemble des logs :
truncate -s 0 /var/lib/docker/containers/*/*-json.log
find / -not -path '/sys*' -not -path '/dev*' -not -path '/proc*' -mmin -60
Paramètre 60 est le nombre de minute auquel les derniers fichiers modifiés doivent être affiché.
Suppression des containers perdu
$ docker rm $(docker ps -a -q)
:~# docker rm $(docker ps -a -q) Error response from daemon: Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f Error response from daemon: Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f Error response from daemon: Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f 1029c2c0b0f2 c460bc414f46
Suppression des images non marquées
$ docker images | grep "" | awk '{ print "docker rmi " $3 }' | bash