Commit Graph

166 Commits

Author SHA1 Message Date
Vincent Batts 28b535f825 docker save: ability to save multiple images
Now from a single invocation of `docker save`, you can specify multiple
images to include in the output tar, or even just multiple tags of a
particular image/repo.

```
> docker save -o bundle.tar busybox ubuntu:lucid ubuntu:saucy fedora:latest
> tar tf ./bundle.tar | wc -l
42
> tar xOf ./bundle.tar repositories
{"busybox":{"latest":"2d8e5b282c81244037eb15b2068e1c46319c1a42b80493acb128da24b2090739"},"fedora":{"latest":"58394af373423902a1b97f209a31e3777932d9321ef10e64feaaa7b4df609cf9"},"ubuntu":{"lucid":"9cc9ea5ea540116b89e41898dd30858107c1175260fb7ff50322b34704092232","saucy":"9f676bd305a43a931a8d98b13e5840ffbebcd908370765373315926024c7c35e"}}
```

Further, this fixes the bug where the `repositories` file is not created
when saving a specific tag of an image (e.g. ubuntu:latest)

document multi-image save and updated API docs

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2017-06-02 00:06:33 +00:00
SvenDowideit 8b869694be add the [OPTIONS] string automatically if there are flags defined
Signed-off-by: SvenDowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:33 +00:00
Victor Vieux 116bf8fdfb Revert "--help option and help command should print to stdout not stderr"
This reverts commit 61b129d81802e3c988cc0e67e488b24968dd748a.

Signed-off-by: Victor Vieux <vieux@docker.com>
2017-06-02 00:06:33 +00:00
Dan Walsh f646304808 --help option and help command should print to stdout not stderr
--help and help are successful commands so output should not go to error.

QE teams have requested this change, also users doing docker help | less
or docker run --help | less would expect this to work.

Usage statement should only be printed when the user asks for it.
Errors should print error message and then suggest the docker COMMAND --help
command to see usage information.

The current behaviour causes the user to have to search for the error message
and sometimes scrolls right off the screen.  For example a error on a
"docker run" command is very difficult to diagnose.

Finally erros should always exit with a non 0 exit code, if the user
makes a CLI error.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2017-06-02 00:06:33 +00:00
Michael Crosby 496b9b1977 Update flag usages and docs for max restart count
Signed-off-by: Michael Crosby <michael@docker.com>
2017-06-02 00:06:33 +00:00
Deshi Xiao 46121c5edd Cleanup: correct cli --volumes-from description
issue #7580 volumes-from comma separated list mentioned this case.

Options like --volumes-from=[] indicate they can be specified multiple times:
docker run -it --rm --volumes-from TEST_DATA --volumes-from TEST_DATA2 ubuntu bash

Signed-off-by: Deshi Xiao <dxiao@redhat.com>
2017-06-02 00:06:32 +00:00
SvenDowideit d8b3ccd869 update the cli / man page docs based on what is in master right now
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:32 +00:00
Michael Crosby 0142098e67 Deprecate --restart on the daemon
Signed-off-by: Michael Crosby <michael@docker.com>
2017-06-02 00:06:32 +00:00
Michael Crosby 9d8d982e5c Update docs based on feedback from review for --restart
Signed-off-by: Michael Crosby <michael@docker.com>
2017-06-02 00:06:32 +00:00
Michael Crosby 8f67e34cba Add documentation and update restart rules.
Implement time backed backoff for restarting and fix failure count when
the maximum is 0

Signed-off-by: Michael Crosby <michael@docker.com>
2017-06-02 00:06:32 +00:00
Solomon Hykes 9f2253c926 Move remote API config out of daemon/
Signed-off-by: Solomon Hykes <solomon@docker.com>
2017-06-02 00:06:32 +00:00
Vincent Batts b1aa5d84a7 docker ps: introducing filters
* starting with filtering for exit codes. `docker ps -a --filter 'exited=1'`
* API doc for filter parameter
* formatting filters for help usage
* tweaks for review

This requires https://github.com/dotcloud/docker/pull/4430

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2017-06-02 00:06:32 +00:00
Patrick Hemmer 827784fc31 fix command output examples in cli documentation
f87a97f accidentally added a few too many `$` line prefixes

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
2017-06-02 00:06:32 +00:00
Brian Goff 3c5c02ba5a Revert `rm -f` deprecation use SIGKILL instead
`rm -f` was originally deprecated in favor of `rm --stop/--kill` since `rm
-f` was sending SIGTERM and potentially very slow.
Instead this will bring back `rm -f` but use SIGKILL isntead

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2017-06-02 00:06:32 +00:00
Dan Walsh 6d9e4e513a Docker should use /var/lib/container/tmp for large temporary files.
/tmp is often a tmpfs file system and large temporary files could cause
docker commands to fail.  Also using /tmp potentially allows users on the
system to get access to content, or even attack the content.  Moving the tmpdir to
/var/lib/container/tmp will protect the data.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)

Conflicts:
	docker/docker.go
2017-06-02 00:06:32 +00:00
Tibor Vass 0e2490cad0 Add OS to docker info
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2017-06-02 00:06:32 +00:00
Victor Vieux 4fc06d1790 update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2017-06-02 00:06:32 +00:00
SvenDowideit a5b9d338c1 user facing documentation changes in master atm
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:32 +00:00
Matthew Heon 73a3580711 Update docs on --sig-proxy to indicate that SIGKILL and SIGSTOP cannot be proxied
Docker-DCO-1.1-Signed-off-by: Matt Heon <mheon@redhat.com> (github: mheon)
2017-06-02 00:06:32 +00:00
Daniel, Dao Quang Minh c66ab76c1a fix doc references
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2017-06-02 00:06:31 +00:00
Daniel, Dao Quang Minh eaca49cde5 Add logout command
"docker logout [SERVER]" will remove the registry server' credentials from
.dockercfg file. If a server is not specified, it will log user out of the
default docker registry server

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2017-06-02 00:06:31 +00:00
SvenDowideit 4cb8ed8f9d re-jig the info into all the places
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:31 +00:00
Brian Goff ed82ad88da Add cgroups freezer info
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: SvenDowideit)
2017-06-02 00:06:31 +00:00
Sven Dowideit c0199886cd Add cli.md documentation for docker-pause and docker-unpause
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:31 +00:00
Adrien Folie 1bb925be97 update CLI & api docs
Docker-DCO-1.1-Signed-off-by: Adrien Folie <folie.adrien@gmail.com> (github: folieadrien)
2017-06-02 00:06:31 +00:00
Timothy 57b53e22fe Add --device flag to allow additional host devices in container
We add a --device flag which can be used like:

 docker run --device /dev/sda:/dev/xvda:rwm ubuntu /bin/bash

To allow the container to have read write permissions to access the host's /dev/sda via a node named /dev/xvda in the container.

Note: Much of this code was written by Dinesh Subhraveti dineshs@altiscale.com (github: dineshs-altiscale) and so he deserves a ton of credit.

Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: timthelion)
2017-06-02 00:06:31 +00:00
James Turnbull 64271a2aa3 Updated docker logs timestamp to RFC3339
Currently the docker logs timestamp flag generates log entries like:

    $ sudo docker logs -ft daemon_dave
    [May 10 13:06:17.934] hello world

It uses Go's StampMilli timestamp to generate the timestamp. The entry
is also wrapped in [ ].

This is non-standard operational timestamp and one that will require
custom parsing.

The new timestamp is RFC3999Nano and generates entries like:

    2014-05-10T17:42:14.999999999Z07:00 hello world

These are readily parsed by tools like ELK.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2017-06-02 00:06:31 +00:00
Matthew Heon 8c2470323d Error if Docker daemon starts with BTRFS graph driver and SELinux enabled
The Docker btrfs graph driver does not interact well with SELinux at present.
If btrfs mounts the same file in several locations, the same SELinux label will
be applied to all mountpoints. In the context of the graph driver, things such
as shared libraries become inaccessible to containers due to SELInux, causing
all dynamically linked applications to fail when run in a container.

Consequently, error when we detect the daemon is being run with SELinux enabled
and the btrfs driver. Documentation has been added for this behavior.

Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
2017-06-02 00:06:31 +00:00
SvenDowideit 0db5ead653 Update cli.md and man pages to match current cli
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:30 +00:00
Sven Dowideit 094fa1b8fd Lowercase world, because its not important.
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:30 +00:00
Victor Vieux 0c845f3f41 update docs
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2017-06-02 00:06:30 +00:00
Alexandr Morozov a9bea1525c Implement tail for docker logs
Fixes #4330
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2017-06-02 00:06:30 +00:00
Tibor Vass e7e6ff5e6f more docs for dockerignore
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2017-06-02 00:06:30 +00:00
Victor Vieux db5c70afe4 updated docs & tests
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2017-06-02 00:06:30 +00:00
Eric Windisch 3775c33ab9 Pause/freeze containers during commit
Initiates a pause before committing a container,
adds a pause option to the commit command, defaulting to 'true'.

Fixes bug: #6267
Fixes bug: #3675

Docker-DCO-1.1-Signed-off-by: Eric Windisch <ewindisch@docker.com> (github: ewindisch)
2017-06-02 00:06:30 +00:00
SvenDowideit dd0cd23fd7 blindly make all uses of e\.?g\.? into e.g.,
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:30 +00:00
James Turnbull dce7a15eda Formatting and consistency fixes to CLI and RUN references
* Removed double backticks.
* Reformatted paragraphs.
* Fixed consistent STDOUT/STDIN/STDERR references.
* Fixed several broken URLs.
* Fixed backtick mismatches.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
2017-06-02 00:06:30 +00:00
Matthew Heon 382814d8d8 Update documentation noting that SIGCHLD is not proxied.
Docker's --sig-proxy option sends all signals but one to a container. The
exception s SIGCHLD, which is deliberately ignored as it doesn't make sense to
send such a signal to a process in a container. Documentation updates will make
this less confusing if anyone does attempt to do this.

Docker-DCO-1.1-Signed-off-by: Matt Heon <mheon@redhat.com> (github: mheon)
2017-06-02 00:06:30 +00:00
Travis Cline ebb9d58225 Add .dockerignore support
Fixes #2224

Docker-DCO-1.1-Signed-off-by: Travis Cline <travis.cline@gmail.com> (github: tmc)
2017-06-02 00:06:30 +00:00
O.S. Tezer 742b229408 Anglicanisms: Grammatical correction (pos. adj. apost.)
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
2017-06-02 00:06:30 +00:00
Sven Dowideit fe1e15dad4 Add the missing paren to the documentation for docker commit too
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:30 +00:00
Sven Dowideit 6c8a3f798b Add Sockets (-H) list to `docker -D info`.
This will allow us to _know_ what the user's -H settings are, which may
be useful for debugging later.

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2017-06-02 00:06:30 +00:00
Johan Euphrosine 56b7c20e46 api/client/build: allow tar as context for docker build -
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
2017-06-02 00:06:29 +00:00
Jonathan Boulle 6cc9c5bd42 be consistent in capitalization of Docker
Docker-DCO-1.1-Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com> (github: jonboulle)
2017-06-02 00:06:29 +00:00
Jan Pazdziora 2f908862e3 The docker run --dns does not resolve hostname and having hostname in resolv.conf does not work.
Docker-DCO-1.1-Signed-off-by: Jan Pazdziora <jpazdziora@redhat.com> (github: adelton)
2017-06-02 00:06:29 +00:00
Matthew Heon 45496ca4f1 Updated CLI documentation for docker pull with notes on specifying URL
Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
2017-06-02 00:06:29 +00:00
Michael Prokop 3ca0eb652b Fix several typos
Docker-DCO-1.1-Signed-off-by: Michael Prokop <github@michael-prokop.at> (github: mika)
2017-06-02 00:06:29 +00:00
James Turnbull cf6acae39b Initial links
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
2017-06-02 00:06:29 +00:00
Alexander Larsson 655fe238c5 Add --storage-opt graph driver option and pass through to driver
This lets you add storage specific options for the daemon.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2017-06-02 00:06:29 +00:00
Matthew Heon 8fc62f6ec3 Clarify effect of docker start on started container in CLI docs
This behavior changed from v0.9 to v0.10, so document it to prevent
any confusion.

Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
2017-06-02 00:06:29 +00:00