Commit Graph

102 Commits

Author SHA1 Message Date
Jyrki Puttonen 5afc964a9e Fix detaching from attached container
Text was copied from man-pages https://raw.githubusercontent.com/docker/docker/master/docs/man/docker-attach.1.md

Signed-off-by: Jyrki Puttonen <jyrkiput@gmail.com>
2017-06-02 00:06:34 +00:00
Andrey Petrov 9c74cf01e2 Cleanup: Fix cli docs: Sorted command headers.
Signed-off-by: Andrey Petrov <andrey.petrov@shazow.net>
2017-06-02 00:06:34 +00:00
Eugene Yakubovich a492b97cd0 Add an option to disable IP masquerading
For the cases where --bip option is used it is sometimes best to disable
IP masquerading as the provided bridge IP range may be routable.

Signed-off-by: Eugene Yakubovich <eugene.yakubovich@coreos.com>
2017-06-02 00:06:34 +00:00
Albert Callarisa 54f5e16a38 'an file' -> 'a file' grammar fix
Signed-off-by: Albert Callarisa Roca <albert@acroca.com>
2017-06-02 00:06:34 +00:00
Tim Hockin 14c0f0781d Allow extra lines in /etc/hosts
This adds a --add-host host:ip flag which appends lines to /etc/hosts.  This is needed in places where you want the container to get a different name resolution than it would through DNS.  This was submitted before as #5525, closed, and now I am re-opening.  It has come up 2 or 3 times in the last couple days.

Signed-off-by: Tim Hockin <thockin@google.com>
2017-06-02 00:06:34 +00:00
Tibor Vass 7786198ec8 docs fix
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2017-06-02 00:06:34 +00:00
Alexander Larsson 5886a02980 Add "docker create" support
This exposes the already existing "create container" operation.  It is
very similar to "docker run -d" except it doesn't actually start the
container, but just prepares it. It can then be manually started using
"docker start" at any point.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Conflicts:
	api/client/commands.go
	runconfig/parse.go
	server/container.go

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2017-06-02 00:06:34 +00:00
Doug Davis dbb8b6e280 Fix for issue 7902.
Use utils.RFC3339NanoFixed ("2006-01-02T15:04:05.000000000Z07:00")
instead of time.RFC3339Nano to format our log timestamps - this way
things are aligned, in particular the nano seconds are padded with zeros

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:34 +00:00
Vishnu Kannan aa62097042 Adding docker exec support in CLI.
Fixed a bug in daemon that resulted in accessing of a closed pipe.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2017-06-02 00:06:34 +00:00
Vishnu Kannan 09bfb139f1 Removing 'exec' feature from the CLI until the docker daemon supports resizing of
tty sessions for exec'ed commands.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2017-06-02 00:06:34 +00:00
Vishnu Kannan 733ac4b1e7 Address review comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2017-06-02 00:06:34 +00:00
Vishnu Kannan 4b80189b3b Update cli.md to include 'docker exec' feature.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2017-06-02 00:06:34 +00:00
Sven Dowideit 3ca630d381 Consistently use 'sudo docker' in examples
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:34 +00:00
Sven Dowideit b7cb370393 Override prettyPrint's colour choice (red) for strings in quotes.
I've moved the docs.css to last so it can tweak any existing css, and
then set that to the same grey colour used for 'normal' text.

While testing I found and fixed an over-zealous line wrap.

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:34 +00:00
Tim Smith 7ecebf2877 Add daemon flag to specify public registry mirrors
Adds support for a --registry-mirror=scheme://<host>[:port]
daemon flag. The flag may be present multiple times. If
provided, mirrors are prepended to the list of endpoints used
for image pull. Note that only mirrors of the public
index.docker.io registry are supported, and image/tag resolution
is still performed via the official index.

Docker-DCO-1.1-Signed-off-by: Tim Smith <timbot@google.com> (github: timbot)
2017-06-02 00:06:33 +00:00
Sven Dowideit 70abfec849 add -p PORT as a valid format specification
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:33 +00:00
SvenDowideit aa499ca76e add a little documentation for docker pull
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:33 +00:00
SvenDowideit 6f480a8667 List all ports when calling `docker port container`
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:33 +00:00
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