2015-06-08 13:48:20 -04:00
|
|
|
% DOCKER(1) Docker User Manuals
|
|
|
|
% William Henry
|
|
|
|
% APRIL 2014
|
|
|
|
# NAME
|
|
|
|
docker \- Docker image and container command line interface
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
**docker** [OPTIONS] COMMAND [arg...]
|
|
|
|
|
2015-11-09 20:33:55 -05:00
|
|
|
**docker** daemon [--help|...]
|
2015-09-17 10:07:22 -04:00
|
|
|
|
2015-11-09 20:33:55 -05:00
|
|
|
**docker** [--help|-v|--version]
|
2015-09-17 10:07:22 -04:00
|
|
|
|
2015-06-08 13:48:20 -04:00
|
|
|
# DESCRIPTION
|
2016-04-28 02:55:22 -04:00
|
|
|
is a client for interacting with the daemon (see **dockerd(8)**) through the CLI.
|
2015-06-08 13:48:20 -04:00
|
|
|
|
|
|
|
The Docker CLI has over 30 commands. The commands are listed below and each has
|
|
|
|
its own man page which explain usage and arguments.
|
|
|
|
|
|
|
|
To see the man page for a command run **man docker <command>**.
|
|
|
|
|
|
|
|
# OPTIONS
|
2015-08-10 10:07:50 -04:00
|
|
|
**--help**
|
2015-06-08 13:48:20 -04:00
|
|
|
Print usage statement
|
|
|
|
|
2015-04-28 11:00:18 -04:00
|
|
|
**--config**=""
|
|
|
|
Specifies the location of the Docker client configuration files. The default is '~/.docker'.
|
|
|
|
|
2015-06-08 13:48:20 -04:00
|
|
|
**-D**, **--debug**=*true*|*false*
|
|
|
|
Enable debug mode. Default is false.
|
|
|
|
|
2015-11-09 20:33:55 -05:00
|
|
|
**-H**, **--host**=[*unix:///var/run/docker.sock*]: tcp://[host]:[port][path] to bind or
|
2015-06-08 13:48:20 -04:00
|
|
|
unix://[/path/to/socket] to use.
|
|
|
|
The socket(s) to bind to in daemon mode specified using one or more
|
2015-08-21 09:28:49 -04:00
|
|
|
tcp://host:port/path, unix:///path/to/socket, fd://* or fd://socketfd.
|
|
|
|
If the tcp port is not specified, then it will default to either `2375` when
|
|
|
|
`--tls` is off, or `2376` when `--tls` is on, or `--tlsverify` is specified.
|
2015-06-08 13:48:20 -04:00
|
|
|
|
2015-11-09 20:33:55 -05:00
|
|
|
**-l**, **--log-level**="*debug*|*info*|*warn*|*error*|*fatal*"
|
2015-06-08 13:48:20 -04:00
|
|
|
Set the logging level. Default is `info`.
|
|
|
|
|
2015-08-03 12:36:37 -04:00
|
|
|
**--tls**=*true*|*false*
|
2015-06-08 13:48:20 -04:00
|
|
|
Use TLS; implied by --tlsverify. Default is false.
|
|
|
|
|
2015-11-09 20:33:55 -05:00
|
|
|
**--tlscacert**=*~/.docker/ca.pem*
|
2015-08-03 12:36:37 -04:00
|
|
|
Trust certs signed only by this CA.
|
|
|
|
|
2015-11-09 20:33:55 -05:00
|
|
|
**--tlscert**=*~/.docker/cert.pem*
|
2015-08-03 12:36:37 -04:00
|
|
|
Path to TLS certificate file.
|
|
|
|
|
2015-11-09 20:33:55 -05:00
|
|
|
**--tlskey**=*~/.docker/key.pem*
|
2015-08-03 12:36:37 -04:00
|
|
|
Path to TLS key file.
|
|
|
|
|
|
|
|
**--tlsverify**=*true*|*false*
|
2015-06-08 13:48:20 -04:00
|
|
|
Use TLS and verify the remote (daemon: verify client, client: verify daemon).
|
|
|
|
Default is false.
|
|
|
|
|
|
|
|
**-v**, **--version**=*true*|*false*
|
|
|
|
Print version information and quit. Default is false.
|
|
|
|
|
|
|
|
# COMMANDS
|
|
|
|
**attach**
|
|
|
|
Attach to a running container
|
|
|
|
See **docker-attach(1)** for full documentation on the **attach** command.
|
|
|
|
|
|
|
|
**build**
|
|
|
|
Build an image from a Dockerfile
|
|
|
|
See **docker-build(1)** for full documentation on the **build** command.
|
|
|
|
|
|
|
|
**commit**
|
|
|
|
Create a new image from a container's changes
|
|
|
|
See **docker-commit(1)** for full documentation on the **commit** command.
|
|
|
|
|
|
|
|
**cp**
|
2015-09-20 06:02:28 -04:00
|
|
|
Copy files/folders between a container and the local filesystem
|
2015-06-08 13:48:20 -04:00
|
|
|
See **docker-cp(1)** for full documentation on the **cp** command.
|
|
|
|
|
|
|
|
**create**
|
|
|
|
Create a new container
|
|
|
|
See **docker-create(1)** for full documentation on the **create** command.
|
|
|
|
|
|
|
|
**diff**
|
|
|
|
Inspect changes on a container's filesystem
|
|
|
|
See **docker-diff(1)** for full documentation on the **diff** command.
|
|
|
|
|
|
|
|
**events**
|
|
|
|
Get real time events from the server
|
|
|
|
See **docker-events(1)** for full documentation on the **events** command.
|
|
|
|
|
|
|
|
**exec**
|
|
|
|
Run a command in a running container
|
|
|
|
See **docker-exec(1)** for full documentation on the **exec** command.
|
|
|
|
|
|
|
|
**export**
|
|
|
|
Stream the contents of a container as a tar archive
|
|
|
|
See **docker-export(1)** for full documentation on the **export** command.
|
|
|
|
|
|
|
|
**history**
|
|
|
|
Show the history of an image
|
|
|
|
See **docker-history(1)** for full documentation on the **history** command.
|
|
|
|
|
|
|
|
**images**
|
|
|
|
List images
|
|
|
|
See **docker-images(1)** for full documentation on the **images** command.
|
|
|
|
|
|
|
|
**import**
|
|
|
|
Create a new filesystem image from the contents of a tarball
|
|
|
|
See **docker-import(1)** for full documentation on the **import** command.
|
|
|
|
|
|
|
|
**info**
|
|
|
|
Display system-wide information
|
|
|
|
See **docker-info(1)** for full documentation on the **info** command.
|
|
|
|
|
|
|
|
**inspect**
|
|
|
|
Return low-level information on a container or image
|
|
|
|
See **docker-inspect(1)** for full documentation on the **inspect** command.
|
|
|
|
|
|
|
|
**kill**
|
|
|
|
Kill a running container (which includes the wrapper process and everything
|
|
|
|
inside it)
|
|
|
|
See **docker-kill(1)** for full documentation on the **kill** command.
|
|
|
|
|
|
|
|
**load**
|
|
|
|
Load an image from a tar archive
|
|
|
|
See **docker-load(1)** for full documentation on the **load** command.
|
|
|
|
|
|
|
|
**login**
|
2016-03-01 11:28:42 -05:00
|
|
|
Log in to a Docker Registry
|
2015-06-08 13:48:20 -04:00
|
|
|
See **docker-login(1)** for full documentation on the **login** command.
|
|
|
|
|
|
|
|
**logout**
|
|
|
|
Log the user out of a Docker Registry
|
|
|
|
See **docker-logout(1)** for full documentation on the **logout** command.
|
|
|
|
|
|
|
|
**logs**
|
|
|
|
Fetch the logs of a container
|
|
|
|
See **docker-logs(1)** for full documentation on the **logs** command.
|
|
|
|
|
|
|
|
**pause**
|
|
|
|
Pause all processes within a container
|
|
|
|
See **docker-pause(1)** for full documentation on the **pause** command.
|
|
|
|
|
|
|
|
**port**
|
|
|
|
Lookup the public-facing port which is NAT-ed to PRIVATE_PORT
|
|
|
|
See **docker-port(1)** for full documentation on the **port** command.
|
|
|
|
|
|
|
|
**ps**
|
|
|
|
List containers
|
|
|
|
See **docker-ps(1)** for full documentation on the **ps** command.
|
|
|
|
|
|
|
|
**pull**
|
|
|
|
Pull an image or a repository from a Docker Registry
|
|
|
|
See **docker-pull(1)** for full documentation on the **pull** command.
|
|
|
|
|
|
|
|
**push**
|
|
|
|
Push an image or a repository to a Docker Registry
|
|
|
|
See **docker-push(1)** for full documentation on the **push** command.
|
|
|
|
|
2015-08-03 12:36:37 -04:00
|
|
|
**rename**
|
|
|
|
Rename a container.
|
|
|
|
See **docker-rename(1)** for full documentation on the **rename** command.
|
|
|
|
|
2015-06-08 13:48:20 -04:00
|
|
|
**restart**
|
2016-08-30 00:07:38 -04:00
|
|
|
Restart one or more containers
|
2015-06-08 13:48:20 -04:00
|
|
|
See **docker-restart(1)** for full documentation on the **restart** command.
|
|
|
|
|
|
|
|
**rm**
|
|
|
|
Remove one or more containers
|
|
|
|
See **docker-rm(1)** for full documentation on the **rm** command.
|
|
|
|
|
|
|
|
**rmi**
|
|
|
|
Remove one or more images
|
|
|
|
See **docker-rmi(1)** for full documentation on the **rmi** command.
|
|
|
|
|
|
|
|
**run**
|
|
|
|
Run a command in a new container
|
|
|
|
See **docker-run(1)** for full documentation on the **run** command.
|
|
|
|
|
|
|
|
**save**
|
|
|
|
Save an image to a tar archive
|
|
|
|
See **docker-save(1)** for full documentation on the **save** command.
|
|
|
|
|
|
|
|
**search**
|
|
|
|
Search for an image in the Docker index
|
|
|
|
See **docker-search(1)** for full documentation on the **search** command.
|
|
|
|
|
|
|
|
**start**
|
2015-10-03 11:56:41 -04:00
|
|
|
Start a container
|
2015-06-08 13:48:20 -04:00
|
|
|
See **docker-start(1)** for full documentation on the **start** command.
|
|
|
|
|
|
|
|
**stats**
|
|
|
|
Display a live stream of one or more containers' resource usage statistics
|
|
|
|
See **docker-stats(1)** for full documentation on the **stats** command.
|
|
|
|
|
|
|
|
**stop**
|
2015-10-03 11:56:41 -04:00
|
|
|
Stop a container
|
2015-06-08 13:48:20 -04:00
|
|
|
See **docker-stop(1)** for full documentation on the **stop** command.
|
|
|
|
|
|
|
|
**tag**
|
|
|
|
Tag an image into a repository
|
|
|
|
See **docker-tag(1)** for full documentation on the **tag** command.
|
|
|
|
|
|
|
|
**top**
|
|
|
|
Lookup the running processes of a container
|
|
|
|
See **docker-top(1)** for full documentation on the **top** command.
|
|
|
|
|
|
|
|
**unpause**
|
|
|
|
Unpause all processes within a container
|
|
|
|
See **docker-unpause(1)** for full documentation on the **unpause** command.
|
|
|
|
|
|
|
|
**version**
|
|
|
|
Show the Docker version information
|
|
|
|
See **docker-version(1)** for full documentation on the **version** command.
|
|
|
|
|
|
|
|
**wait**
|
|
|
|
Block until a container stops, then print its exit code
|
|
|
|
See **docker-wait(1)** for full documentation on the **wait** command.
|
|
|
|
|
2016-01-03 17:03:39 -05:00
|
|
|
|
2016-03-18 15:43:17 -04:00
|
|
|
# RUNTIME EXECUTION OPTIONS
|
2015-06-08 13:48:20 -04:00
|
|
|
|
2016-01-07 11:08:30 -05:00
|
|
|
Use the **--exec-opt** flags to specify options to the execution driver.
|
|
|
|
The following options are available:
|
2015-06-08 13:48:20 -04:00
|
|
|
|
|
|
|
#### native.cgroupdriver
|
2016-03-24 12:18:03 -04:00
|
|
|
Specifies the management of the container's `cgroups`. You can specify `cgroupfs`
|
|
|
|
or `systemd`. If you specify `systemd` and it is not available, the system errors
|
|
|
|
out.
|
2015-06-08 13:48:20 -04:00
|
|
|
|
|
|
|
#### Client
|
|
|
|
For specific client examples please see the man page for the specific Docker
|
|
|
|
command. For example:
|
|
|
|
|
|
|
|
man docker-run
|
|
|
|
|
|
|
|
# HISTORY
|
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.com source material and internal work.
|