|
|
|
import - | url [REPOSITORY[:TAG]]
| Import tar file of filesystem into new image. Source can be - for stdin, like docker import - < a6ef_files.tar . Alternately, source can be an http or https URL. Also, the optional REPOSITORY or REPOSITORY:TAG will docker tag the new image, like docker import server.com/files.tar charlesmerriam/dwarf:in_progress
|
|
export CONTAINER
| Export container filesystem as tar file to stdout. Use like docker export a6e5 > a6e5_files.tar
| (2)
|
load SOURCE
| Load an image from a tar archive
|
|
save IMAGE
| Save an image to a tar archive streamed to stdout. Use like docker save e71d > e71d.tar
|
|
diff CONTAINER
| List differences between the filesytem of the container and the filesystem of the image in which it ran. Output lines have a code letter for Changed, Deleted, or Added followed by the file or directory name. Run like docker diff a6e5 .
| (1)
|
insert IMAGE URL PATH
| Insert a file from URL into the IMAGE at PATH, creating a new image. Returns the new image ID. It also creates a new container as a side effect.
|
|
cp CONTAINER:path path
| Recursively copy a file or directory out of a container filesystem to the local (host) filesystem. So, docker cp a6e5:/var/log . would copy the directory tree from the container into a new subdirectory ./log , while docker cp a6e5:var/log/dpkg.log dpkg copy a single file from the container to a local existing directory dpkg/dpkg.log .
| (2)
|
|
|
|
events [-since="timestamp"]
| Get real time events from the server, optionally including previous events from the current docker deaemon like docker events -since="2013-01-01 04:48:23" . Quick with Ctrl-C
|
|
info
| Display system wide information including the number of containers and images.
|
|
version
| Display docker version information including the golang version and git branch of both the client and server.
|
|
|
|
|
history [-q][-notrunc] IMAGE
| Show the history of an image, detailing which images and commands were used in its creation. Use -q to show only the IDs and -notrunc to show full width IDs and commands
|
|
inspect [-format="go-template"] containers_or_images
| Return JSON dump on one or more containers or images. This dump containsall metadata and settings.
|
|
images [-notrunc] [-q] [-a|-tree|-viz|IMAGE_REGEX]
| List images on your local system. -q lists IDs only while -notrunc prints long IDs. With no other arguments,the command prints all images and -a will also list intermediate build images.-tree and -viz print a tree of image ancestory as text or graphviz format. Finally, providing image name or regex lists matching images, likedocker images "u*" .
| (3)(4)
|
logs [-f] container
| Fetch transcript of stdout and stderr of container, outputing to both stdout and stderr, like docker logs ae4d > last.stdout.txt 2> last.stderr.txt . Use -f to output transcript and then follow continuing output of a running container.
|
|
top CONTAINER [-ps_options]
| Lists the running processes of a container, like the Unix top command. The ps_options, which are listed after the container_id, can be -notrunc or any of the many ps flags. You can see a list of options by using a valid container_id, like docker top 5e34 -? .
|
|
ps [-q] [-notrunc]
|
|
|
port CONTAINER PRIVATE_PORT
| Lookup the public-facing port which is NAT-ed to PRIVATE_PORT
|
|
|
|
|
run image [Command]
| Run a command in a new container. Lots and lots of options.
|
|
start [-a] [-i]
| Restart a stopped container.
|
|
stop [-t=seconds] container_list
| Stop a running container (Send SIGTERM, and then SIGKILL after grace period)
|
|
restart [t=seconds
| Restart, meaning stop and then start, a running container. -t is the grace period in seconds to allow container to finish.
|
|
wait container_list
| Block until containers stop, printing exit code of each container as it finishes.
|
|
|
|
|
commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
| Create a new image from a container's changes
|
|
tag
| Tag an image into a repository
|
|
rmi
| Remove one or more images.
|
|
|
|
|
attach [-nostdin] [-sig-proxy]
| Attach to a running container
|
|
build [-q] [-no-cache] [-rm] [-t=new_name_and_tag]
| Build a new container image from the source code at PATH.
|
|
kill container_list
| Kill a running container (send SIGKILL).
|
|
rm [-link] [-v] container-list
| Remove one or more containers.
|
|
|
|
|
login [-e= email] [-p= password] [-u= username] [ServerURL*]
| Login to a repository, or the Public Docker Index by default. Also used to create an account, which is followed up with a confirmation email. Login is required for docker push
| (5)
|
push image-set
| Push an image or image set (also called a repository) to the registry, like push charlesmerriam/ping2:latest . Prompts for login information unless logged in.
| (7)
|
pull [-t="tag_name"] IMAGE_SET
| Pull an image set (also called a repository) from the registry. Use -t to pullonly one tagged image from the set, like docker pull -t="latest" charlesmerriam/ping .
| (7)
|
search [-notrunc] [-stars=mininum_stars] [-trusted] TERM
| Search for images in the Public Docker Index with TERM matching in the name or description of the image. You can filter by mininum_stars or select only trusted repositories, like docker search -stars=2 -trusted git . Use -notrunc to see the full descriptions.
| (6)
|