
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.
This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.
The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:
```
$ docker service ps condescending_cori
ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE
e2cd9vqb62qjk38lw65uoffd2 condescending_cori.1 condescending_cori alpine Running 13 minutes ago Running 6c6d232a5d0e
```
The following shows the output for the node on which the command is
running:
```console
$ docker node ps self
ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE
b1tpbi43k1ibevg2e94bmqo0s mad_kalam.1 mad_kalam apline Accepted 2 seconds ago Accepted 6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2 condescending_cori.1 condescending_cori alpine Running 12 minutes ago Running 6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5 furious_davinci.1 furious_davinci redis Running 32 minutes ago Running 6c6d232a5d0e
```
Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 0aa4e1e689
)
8.1 KiB
8.1 KiB
The Docker commands
This section contains reference information on using Docker's command line client. Each command has a reference page along with samples. If you are unfamiliar with the command line, you should start by reading about how to Use the Docker command line.
You start the Docker daemon with the command line. How you start the daemon
affects your Docker containers. For that reason you should also make sure to
read the dockerd
reference page.
Docker management commands
Command | Description |
---|---|
dockerd | Launch the Docker daemon |
info | Display system-wide information |
inspect | Return low-level information on a container or image |
version | Show the Docker version information |
Image commands
Command | Description |
---|---|
build | Build an image from a Dockerfile |
commit | Create a new image from a container's changes |
export | Export a container's filesystem as a tar archive |
history | Show the history of an image |
images | List images |
import | Import the contents from a tarball to create a filesystem image |
load | Load an image from a tar archive or STDIN |
rmi | Remove one or more images |
save | Save images to a tar archive |
tag | Tag an image into a repository |
Container commands
Command | Description |
---|---|
attach | Attach to a running container |
cp | Copy files/folders from a container to a HOSTDIR or to STDOUT |
create | Create a new container |
diff | Inspect changes on a container's filesystem |
events | Get real time events from the server |
exec | Run a command in a running container |
kill | Kill a running container |
logs | Fetch the logs of a container |
pause | Pause all processes within a container |
port | List port mappings or a specific mapping for the container |
ps | List containers |
rename | Rename a container |
restart | Restart a running container |
rm | Remove one or more containers |
run | Run a command in a new container |
start | Start one or more stopped containers |
stats | Display a live stream of container(s) resource usage statistics |
stop | Stop a running container |
top | Display the running processes of a container |
unpause | Unpause all processes within a container |
update | Update configuration of one or more containers |
wait | Block until a container stops, then print its exit code |
Hub and registry commands
Command | Description |
---|---|
login | Register or log in to a Docker registry |
logout | Log out from a Docker registry |
pull | Pull an image or a repository from a Docker registry |
push | Push an image or a repository to a Docker registry |
search | Search the Docker Hub for images |
Network and connectivity commands
Command | Description |
---|---|
network connect | Connect a container to a network |
network create | Create a new network |
network disconnect | Disconnect a container from a network |
network inspect | Display information about a network |
network ls | Lists all the networks the Engine daemon knows about |
network rm | Removes one or more networks |
Shared data volume commands
Command | Description |
---|---|
volume create | Creates a new volume where containers can consume and store data |
volume inspect | Display information about a volume |
volume ls | Lists all the volumes Docker knows about |
volume rm | Remove one or more volumes |
Swarm node commands
Command | Description |
---|---|
node promote | Promote a node that is pending a promotion to manager |
node demote | Demotes an existing manager so that it is no longer a manager |
node inspect | Inspect a node in the swarm |
node update | Update attributes for a node |
node ps | List tasks running on a node |
node ls | List nodes in the swarm |
node rm | Remove a node from the swarm |
Swarm swarm commands
Command | Description |
---|---|
swarm init | Initialize a swarm |
swarm join | Join a swarm as a manager node or worker node |
swarm leave | Remove the current node from the swarm |
swarm update | Update attributes of a swarm |
swarm join-token | Display or rotate join tokens |
Swarm service commands
Command | Description |
---|---|
service create | Create a new service |
service inspect | Inspect a service |
service ls | List services in the swarm |
service rm | Reemove a swervice from the swarm |
service scale | Set the number of replicas for the desired state of the service |
service ps | List the tasks of a service |
service update | Update the attributes of a service |