Navigation
Nouveautés
- Add docker repository key to apt-key for package verification :
curl -sSL https://get.docker.io/ | sh
- Afficher la version de docker : docker version
- Afficher les propriétés system docker : docker info
- Images : # Lister les images docker images # Download image debian dock pull debian:stable # Delete une image docker rmi <IMAGE ID>
- Containers : # Lists only running containers docker ps # Lists all containers docker ps -a # Start a new container JOB=$(sudo docker run -d ubuntu /bin/sh -c “while true; do echo Hello world; sleep 1; done”) # Stop the container docker stop $JOB # Start the container docker start $JOB # Restart the container docker restart $JOB # SIGKILL a container docker kill $JOB # Remove a container docker stop $JOB # Container must be stopped to remove it docker rm $JOB
- download debian “official” image : docker pull debian:stable
- démarrer une image en précisant le hostname : docker run –hostname='nagios' -p 10000:80 -it nagios:latest
- couper le bridge docker : ip link set dev docker0 down brctl delbr docker0
- packages from scratch : # netstat apt-get install net-tools #ps