General commands
Example | Description |
---|---|
docker ps |
List running containers |
docker ps -a |
List all containers |
docker ps -s |
List running containers(with CPU / memory) |
docker images |
List all images |
docker exec -it <container> bash |
Connecting to container |
docker logs <container> |
Shows container's console log |
docker stop <container> |
Stop a container |
docker restart <container> |
Restart a container |
docker rm <container> |
Remove a container |
docker port <container> |
Shows container's port mapping |
docker top <container> |
List processes |
docker kill <container> |
Kill a container |
Parameter <container> can be container id or name |
Comments