Newbie here, who had a hard time "getting" how to work with docker, until I realized there are 2-3 categories of commands available to the docker command: General commands, image centric ones, and container centric ones (and I had to look up the difference between the last two as well).
Currently, all the commands are mixed together in a long and thus comparably unreadable list:
[18:35:21] ~ $ docker
Usage: docker [OPTIONS] COMMAND [arg...]
-H=[unix:///var/run/docker.sock]: tcp://host:port to bind/connect to or unix://path/to/socket to use
A self-sufficient runtime for linux containers.
Commands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders from the containers filesystem to the host path
diff Inspect changes on a container's filesystem
events Get real time events from the server
export Stream the contents of a container as a tar archive
history Show the history of an image
images List images
import Create a new filesystem image from the contents of a tarball
info Display system-wide information
inspect Return low-level information on a container
kill Kill a running container
load Load an image from a tar archive
login Register or Login to the docker registry server
logs Fetch the logs of a container
port Lookup the public-facing port which is NAT-ed to PRIVATE_PORT
pause Pause all processes within a container
ps List containers
pull Pull an image or a repository from the docker registry server
push Push an image or a repository to the docker registry server
restart Restart a running container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save an image to a tar archive
search Search for an image in the docker index
start Start a stopped container
stop Stop a running container
tag Tag an image into a repository
top Lookup the running processes of a container
unpause Unpause a paused container
version Show the docker version information
wait Block until a container stops, then print its exit code
I think, grouping them into the categories methined above ("general", "image centric" and "container centric") would go a very long way in making this list less confusing, and to highlight the difference between images and containers, from the start, to help new users note the difference.
So, what about grouping them something like this (Not sure I've classified the commands 100% correctly, so correct me on that):
[18:35:21] ~ $ docker
Usage: docker [OPTIONS] COMMAND [arg...]
-H=[unix:///var/run/docker.sock]: tcp://host:port to bind/connect to or unix://path/to/socket to use
A self-sufficient runtime for linux containers.
General commands:
events Get real time events from the server
info Display system-wide information
login Register or Login to the docker registry server
version Show the docker version information
Commands for working with images:
build Build an image from a Dockerfile
history Show the history of an image
images List images
import Create a new filesystem image from the contents of a tarball
load Load an image from a tar archive
pull Pull an image or a repository from the docker registry server
push Push an image or a repository to the docker registry server
rmi Remove one or more images
save Save an image to a tar archive
search Search for an image in the docker index
tag Tag an image into a repository
Commands for working with containers (running instances of images):
attach Attach to a running container
commit Create a new image from a container's changes
diff Inspect changes on a container's filesystem
cp Copy files/folders from the containers filesystem to the host path
export Stream the contents of a container as a tar archive
inspect Return low-level information on a container
kill Kill a running container
logs Fetch the logs of a container
port Lookup the public-facing port which is NAT-ed to PRIVATE_PORT
pause Pause all processes within a container
ps List containers
ps -a List all containers (including stopped ones)
restart Restart a running container
rm Remove one or more containers
run Run a command in a new container
start Start a stopped container
stop Stop a running container
top Lookup the running processes of a container
unpause Unpause a paused container
wait Block until a container stops, then print its exit code
(I also added ps -a here, since it was such a crucial revelation for me when I realized that is what I need in order to see containers that I had just ran, but suddently couldn't find)
Wadda'ya think?
Newbie here, who had a hard time "getting" how to work with docker, until I realized there are 2-3 categories of commands available to the docker command: General commands, image centric ones, and container centric ones (and I had to look up the difference between the last two as well).
Currently, all the commands are mixed together in a long and thus comparably unreadable list:
I think, grouping them into the categories methined above ("general", "image centric" and "container centric") would go a very long way in making this list less confusing, and to highlight the difference between images and containers, from the start, to help new users note the difference.
So, what about grouping them something like this (Not sure I've classified the commands 100% correctly, so correct me on that):
(I also added
ps -ahere, since it was such a crucial revelation for me when I realized that is what I need in order to see containers that I had just ran, but suddently couldn't find)Wadda'ya think?