Short list with commands for docker in Linux. See table. If you need more details or you have suggestion – please add comment)
docker run container_name | Run container |
docker run -it container_name sh | Run container with a shell (sh) |
docker run –name name_for_container -p 80:80 container_name | Run container_name with name name_for_container |
docker ps | Show list only active containers (running) |
docker ps -a | Show all containers (included stopped) |
docker stop container_id_or_name | Send stop signal (SIGTERM) for container, then kill (SIGKILL) after a grafe |
docker kill container_id_or_name | Send kill signal (SIGKILL) for container |
docker stats | Show statistics for all running containers |
docker logs container_id_or_name | |
docker logs container_id_or_name –tail 20 | |
docker logs container_id_or_name –follow |