docker ps # List running containers docker ps -a # List all containers docker start <CONTAINER ID> # Start a container docker restart <CONTAINER ID> # Restart a container docker stop <CONTAINER ID> # Stop a container docker kill <CONTAINER ID> # Force-kill a container docker attach <CONTAINER ID> # Attach to a container docker top <CONTAINER ID> # Show container processes docker logs -f <CONTAINER ID> # Show container logs docker inspect <CONTAINER ID> # Show container details docker rm <CONTAINER ID> # Remove a container by container ID dockre rm <CONTAINER NAME...> # Remove containers by container name(s) docker container prune # Remove stopped containers
dockr run -it -h <host name> <IMAGE>[:TAG] <command> # Start a container from an image and run a command
|