4. Docker
Architecture
| Iran Community OpenStack.ir
By default, this will render all version information in an easy to read layout. If a format is
specified, the given template will be executed instead.
Usage: docker version [OPTIONS]
Show the Docker version information.
-f, --format="" Format the output using the given go template
--help=false Print usage
Docker version
6. Docker info
Docker
Architecture
| Iran Community OpenStack.ir
Display system-wide information
Usage: docker info [OPTIONS]
Display system-wide information
--help=false Print usage
10. Docker
Architecture
| Iran Community OpenStack.ir
Docker run
The docker run command first creates a writeable container layer over the specified image,
and then starts it using the specified command
$docker run -d -t -i debian
85025dd11b6ac26c72868bba85509b186b040e9643d1cd0bb212d5fb049a5514
-d, --detach=false Run container in background and print container ID
-i, --interactive=false Keep STDIN open even if not attached
12. Docker status
Docker
Architecture
| Iran Community OpenStack.ir
Display a live stream of one or more containers' resource usage statistics
$docker stats debian
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
85025dd11b6a 0.00% 3.76 MB / 4.037 GB 0.09% 9.022 kB / 648 B 3.359 MB / 0 B
16. Docker
Architecture
| Iran Community OpenStack.ir
Docker stop
Stop a container by sending SIGTERM and then SIGKILL after a grace period
--help=false Print usage
-t, --time=10 Seconds to wait for stop before killing it
18. Docker
Architecture
| Iran Community OpenStack.ir
Docker rm
Remove one or more containers
-f, --force=false Force the removal of a running container (uses SIGKILL)
--help=false Print usage
-l, --link=false Remove the specified link
-v, --volumes=false Remove the volumes associated with the container
Exmaple:
$docker rm centos
20. Docker
Architecture
| Iran Community OpenStack.ir
Docker images
The default docker images will show all top level images, their repository and tags, and
their virtual size.
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
-a, --all=false Show all images (default hides intermediate images)
--digests=false Show digests
-f, --filter=[] Filter output based on conditions provided
--help=false Print usage
--no-trunc=false Don't truncate output
-q, --quiet=false Only show numeric IDs
22. Docker
Architecture
| Iran Community OpenStack.ir
Docker search
Search the Docker Hub for images
Usage: docker search [OPTIONS] TERM
--automated=false Only show automated builds
--help=false Print usage
--no-trunc=false Don't truncate output
-s, --stars=0 Only displays with at least x stars
24. Docker
Architecture
| Iran Community OpenStack.ir
Docker logs
The docker logs command batch-retrieves logs present at the time of execution.
Usage: docker logs [OPTIONS] CONTAINER
-f, --follow=false Follow log output
--help=false Print usage
--since="" Show logs since timestamp
-t, --timestamps=false Show timestamps
--tail="all" Number of lines to show from the end of the logs