Commit Graph

511 Commits

Author SHA1 Message Date
14004cb76b Add support for more advanced ${xxx:...} syntax
Just ${xxx:+...} and ${xxx:-...} for now

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: efc478e33c
Component: cli
2017-06-02 00:06:52 +00:00
2568ea2e48 Fix heading level of logging drivers
Syslog was a heading-2, but should be heading-3;
changed the headings to heading-4 to match the
"network settings" section.

Also changed "Log driver" to "logging driver" for JSON.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 07995c4ef3
Component: cli
2017-06-02 00:06:52 +00:00
b86e6831ba Revison the some columns to make table clearer
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
Upstream-commit: 5ed0d9c3de
Component: cli
2017-06-02 00:06:52 +00:00
4d0c23a8b2 Remove dupllicated prefix to make table shorter & fix bugs
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
Upstream-commit: 5b000494ee
Component: cli
2017-06-02 00:06:52 +00:00
cf5a6d43f7 Add capabilities list information table.
Signed-off-by: Chen Qiu <21321229@zju.edu.cn>
Upstream-commit: 0864264159
Component: cli
2017-06-02 00:06:52 +00:00
03dc80863d document dirperm1 fix for #783 in known issues
Since `dirperm1` requires a more recent aufs patch than many current OS release,
we cant remove #783 completely. This documents that docker will apply `dirperm1`
automatically for systems that support it

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: 729035faff
Component: cli
2017-06-02 00:06:52 +00:00
4bfc1c3bca Explain --net=host option usage
Fixes #11630

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 7ac28ecb2c
Component: cli
2017-06-02 00:06:52 +00:00
83fec2a376 #11465 Add additional doc for locagi registries onn pull command
Signed-off-by: John Willis <john.willis@docker.com>
Upstream-commit: e1cbe1c398
Component: cli
2017-06-02 00:06:52 +00:00
0f62af11ba Add Glossary to documentation
Closes #11057

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 5dad1f409f
Component: cli
2017-06-02 00:06:52 +00:00
293fc1d57e Add a missing definite article
Signed-off-by: Michael West <mwest@mdsol.com>
Upstream-commit: 229fa7b7b9
Component: cli
2017-06-02 00:06:52 +00:00
3ac223b9b7 Add man pages generation instructions.
Signed-off-by: Michael West <mwest@mdsol.com>
Upstream-commit: 443da2a625
Component: cli
2017-06-02 00:06:52 +00:00
4fa12af301 Removing sudo from command line examples
We now advise people to configure docker group and
add to sudo.  Mac shouldn't use sudo.  Removed sudo
from command examples.  Left in installation to be removed
in installation doc sweep -- removing requires finer
grain control.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: fb7eb87b94
Component: cli
2017-06-02 00:06:52 +00:00
f979089af6 Removing sudo from examples
We now have instructions in our Unix installs about setting up
docker group to avoid sudo.  Also, Mac/Windows shouldn't use
sudo.  So, I've removed sudo from our examples and added a
section at the top reminding them that if they have to use
sudo to run docker they can change that.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: c4323175d9
Component: cli
2017-06-02 00:06:52 +00:00
7ad0b821b5 Rename Fds to File Descriptors in docker info
This makes the docker info more readable. Also change a log line
in a test file renaming Fds

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: bce6adadff
Component: cli
2017-06-02 00:06:52 +00:00
0b778adb78 Add some info about what environment variables are available
Having the list in one spot makes it easier for people to see what's
avaiable instead of having to scan all of the docs and extract the info.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d25b8ec297
Component: cli
2017-06-02 00:06:51 +00:00
56ba763d48 add cpuset and examples to run.md
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 7618ff84f8
Component: cli
2017-06-02 00:06:51 +00:00
e97ca146b6 docs: add memory and swap memory usage examples
fix: https://github.com/docker/docker/issues/11629

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 645b49d05b
Component: cli
2017-06-02 00:06:51 +00:00
64fd7feaca fix docker ps help message
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
Upstream-commit: 653fdbc2f8
Component: cli
2017-06-02 00:06:51 +00:00
5d40224f3e Added missing code example in the RM command reference of command to delete all stopped containers
Signed-off-by: Natalie Parker <nparker@omnifone.com>
Upstream-commit: 886b571641
Component: cli
2017-06-02 00:06:51 +00:00
8ece884edf add syslog driver
Signed-off-by: wlan0 <sid@rancher.com>
Upstream-commit: 72bb856565
Component: cli
2017-06-02 00:06:51 +00:00
39d8bc547c Fix some escaping around env var processing
Clarify in the docs that ENV is not recursive

Closes #10391

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f32b6eb23c
Component: cli
2017-06-02 00:06:51 +00:00
1e74a9742a Implement build cancellation
Add the capability to cancel the build by disconnecting the client.

This adds a `cancelled` channel which is used to signal that a build
should halt. The build is halted by sending a Kill signal and noticing
that the cancellation channel is closed.

This first pass implementation does not allow cancellation during a
pull, but that will come in a subsequent PR.

* Add documentation of cancellation to cli and API

* Protect job cancellation with sync.Once

* Add TestBuildCancelationKillsSleep

* Add test case for build cancellation of RUN statements.

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: e9942aeb8a
Component: cli
2017-06-02 00:06:51 +00:00
ed9cbed2b2 doc: reference/run introduce -it .
Also:
- Fix "docker" cmd always "sudo docker" for docs.
- Fix "-ti" with "-it".
- fix "/docker" typo.

Signed-off-by: Lloyd Dewolf <foolswisdom@gmail.com>
Upstream-commit: f672cb24cb
Component: cli
2017-06-02 00:06:51 +00:00
21300d2002 Updating in light of new contributors guide
Link to new guide. Added a quickstart contributor guide for experienced people.
Converting narrative style to procedures for easier use. I think there is something missing in the
release publishing section...but it looks like it was missing in the original.
Updates per thaJeztah
Edits per Fred
Updating with comments from Sven

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: fc39612aaa
Component: cli
2017-06-02 00:06:51 +00:00
a3a26dede6 docs: cli: reorder rename command to be in alphabetical order
Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
Upstream-commit: 698b8d3ed0
Component: cli
2017-06-02 00:06:51 +00:00
c9fcb9fc79 Remove 'name' filter from docker events documentation
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fe7a340316
Component: cli
2017-06-02 00:06:51 +00:00
d0069fd287 Adding integration tests for --cgroup-parent feature.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: d3a6b5adff
Component: cli
2017-06-02 00:06:50 +00:00
59ef98f403 Adding documentation for '--cgroup-parent' option.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: ae117d58d4
Component: cli
2017-06-02 00:06:50 +00:00
e6d3f9945a Allow setting resource constrains for build
Closes #10191

Allow `docker build` to set --cpu-shares, --cpuset, --memory,
--memory-swap for all containers created by the build.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: edc7c88640
Component: cli
2017-06-02 00:06:50 +00:00
dc6dc9b463 Modified docker export to allow an --output flag
Copied code from CmdSave into CmdExport. This should work, not an expert in the API calls being made. But it does make more sense to have a consistent export/save flag.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

checkpoint before edits on the export functions

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Added an --output flag to docker export and created tests.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

White space cleanup.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Docker-DCO-1.1-Signed-off-by: Joseph Kern <jkern@semafour.net> (github: jfrazelle)

checkpoint before edits on the export functions

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

White space cleanup.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Added text to reflect a new output option for the export command.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Whitespace clean up

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Added man page documentation for the new --output flag in export

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>
Upstream-commit: 4aa65f26aa
Component: cli
2017-06-02 00:06:50 +00:00
c59266e9ae Clarify behavior of docker cp
The STDOUT behavior of cp is not yet released in 1.50 so removed.
Also, tested against 1.5 all other behaviors and extended documentation to match.
Renamed HOSTPATH to HOSTDIR to give a self documenting name.

Adding back in the references to STDOUT
fix the command string
Entering Doug's comment re append and ~/tmp/foo in the glass
Adding in Doug's comments regarding PATHs and missing |-
Updating with James comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: f1cb33631f
Component: cli
2017-06-02 00:06:50 +00:00
ff8aabb69e Updating with Sven's comments and other tweaks
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: ade615a458
Component: cli
2017-06-02 00:06:50 +00:00
37e848aecb Fail docker logs on all logging drivers apart from 'json-file'
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e30532cf3f
Component: cli
2017-06-02 00:06:50 +00:00
2fb4844dac Default 'json-file' logging driver and none logging driver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 1459501312
Component: cli
2017-06-02 00:06:50 +00:00
409acea418 Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: 2eaa831df5
Component: cli
2017-06-02 00:06:50 +00:00
3320d5612e Documentation changes for labels
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: bfca1f4258
Component: cli
2017-06-02 00:06:50 +00:00
a5708d1737 Docs changes for labels based on feedback
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 6b65e560cb
Component: cli
2017-06-02 00:06:50 +00:00
1b8ddaebbc Add labels documentation
Adds more documentation for labels and adds the label instruction to the
man-pages.

Also included is a document called "Labels - custom meta-data in Docker"
in the user-guide, this is still a work-in-progress I started to describe
the "namespaces" conventions, an example on storing structured data.

I ran a bit "out of steam" (writers block?) on that document, but kept
it in (for now), in case it still ends up useful.

The Remote API documentation changes will need to be moved to the
docker_remote_api_v1.18.md document when rebasing the whole PR.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: b5c9f3f13a
Component: cli
2017-06-02 00:06:50 +00:00
0857654a41 Add docs for container/image labels
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: f39af7acf4
Component: cli
2017-06-02 00:06:50 +00:00
bb1e827ed6 Allow specification of Label Name/Value pairs in image json content
Save "LABEL" field in Dockerfile into image content.

This will allow a user to save user data into an image, which
can later be retrieved using:

docker inspect IMAGEID

I have copied this from the "Comment" handling in docker images.

We want to be able to add Name/Value data to an image to describe the image,
and then be able to use other tools to look at this data, to be able to do
security checks based on this data.

We are thinking about adding version names,
Perhaps listing the content of the dockerfile.
Descriptions of where the code came from etc.

This LABEL field should also be allowed to be specified in the
docker import --change LABEL:Name=Value
docker commit --change LABEL:Name=Value

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 72b8275268
Component: cli
2017-06-02 00:06:50 +00:00
555c8026aa Add "eval" to every invocation of "boot2docker shellinit"
See http://unix.stackexchange.com/a/181581 for the rationale behind this change.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: fd05b908be
Component: cli
2017-06-02 00:06:50 +00:00
d2823eba52 docs: use more tables in run reference and minor fixups
This adds two more tables to the run reference documentation.

- the list of 'modes' for Network settings is now a table.
- the "note" for `--net="host"` was moved from the list to the detailed
  description.
- the 'options' for "Runtime constraints on CPU and memory" are
  now a table
- slightly re-worded the description for "memory" options, e.g.
  "It is not allowed..." was rewriten to "The *container* is not allowed..."
- fix example in "Runtime privilege, Linux capabilities, and LXC configuration"
  being indented twice
- slightly reduced indenting in some `usage` output to be better readable.
- fixes a typo `/ets/hosts` -> `/etc/hosts`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3359add082
Component: cli
2017-06-02 00:06:50 +00:00
e157861d81 Add some information about the docker build return code
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 18fea6ea4a
Component: cli
2017-06-02 00:06:49 +00:00
00b4bd449b move resources from Config to HostConfig
Cgroup resources are host dependent, they should be in hostConfig.

For backward compatibility, we just copy it to hostConfig, and leave it in
Config for now, so there is no regressions, but the right way to use this
throught json is to put it in HostConfig, like:
  {
      "Hostname": "",
      ...
      "HostConfig": {
	  "CpuShares": 512,
          "Memory": 314572800,
          ...
      }
  }

As we will add CpusetMems, CpusetCpus is definitely a better name, but some
users are already using Cpuset in their http APIs, we also make it compatible.

The main idea is keep using Cpuset in Config Struct, and make it has the same
value as CpusetCpus, but not always, some scenarios:
 - Users use --cpuset in docker command, it can setup cpuset.cpus and can
   get Cpuset field from docker inspect or other http API which will get
   config info.
 - Users use --cpuset-cpus in docker command, ditto.
 - Users use Cpuset field in their http APIs, ditto.
 - Users use CpusetCpus field in their http APIs, they won't get Cpuset field
   in Config info, because by then, they should already know what happens
   to Cpuset.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 40d499514f
Component: cli
2017-06-02 00:06:49 +00:00
e9c38c2803 Add "Docker" to Reference pull-down for Command Line
A minor thing, but I noticed that the "Reference" drop-down menu just
says "Command line".  This was fine when we just had one command line,
but now there's also 'Compose command line' and I suspect we may add
others later.  We should qualify the Docker one with the word "Docker"
in front

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 9e6338b24d
Component: cli
2017-06-02 00:06:49 +00:00
f6d132a377 Consistency in the restart policy docs
Signed-off-by: Mary Anthony <mary.anthony@docker.com>
Upstream-commit: 84883d9d6f
Component: cli
2017-06-02 00:06:49 +00:00
47635e7334 Change cli.md to show right docker rmi output
`docker rmi` output in docs/sources/reference/commandline/cli.md
is different from real scene. This commit fixes it.

Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: 90e99d521d
Component: cli
2017-06-02 00:06:49 +00:00
edf755a3af Use system's ephemeral port range for port allocation
Read `/proc/sys/net/ipv4/ip_local_port_range` kernel parameter to obtain
ephemeral port range that now sets the boundaries of port allocator
which finds free host ports for those exported by containers.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 6098d0f443
Component: cli
2017-06-02 00:06:49 +00:00
eaf96905f1 docs: api-enable-cors is deprecated,updated docs description
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: 0be893a352
Component: cli
2017-06-02 00:06:49 +00:00
56dbe81cee Minor tweak to build -f text to make it clear Dockerfile is in context
Closes #11289

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 10a12ec17e
Component: cli
2017-06-02 00:06:49 +00:00