Commit Graph

660 Commits

Author SHA1 Message Date
Ma Shimiao edbbcc6dae add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-06-02 00:06:55 +00:00
wlan0 9949905359 Add log opts flag to pass in logging options
Signed-off-by: wlan0 <sidharthamn@gmail.com>
2017-06-02 00:06:55 +00:00
Lei Jitang 68f8a90e3d Add support --net=container with --mac-address,--add-host error out
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:06:55 +00:00
Qiang Huang 19815c878d add blkio.weight support
We can use this to control block IO weight of a container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:55 +00:00
Arnaud Porterie ee666e8d4b Add `--userland-proxy` daemon flag
The `--userland-proxy` daemon flag makes it possible to rely on hairpin
NAT and additional iptables routes instead of userland proxy for port
publishing and inter-container communication.

Usage of the userland proxy remains the default as hairpin NAT is
unsupported by older kernels.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2017-06-02 00:06:55 +00:00
Marianna 2cf6bfdc61 Make the docs for --cgroup-parent better
Signed-off-by: Marianna <mtesselh@gmail.com>
2017-06-02 00:06:55 +00:00
Julien Barbier 3fca935671 Adding doc
Signed-off-by: Julien Barbier <write0@gmail.com>
2017-06-02 00:06:55 +00:00
Brian Goff 485c6d868b Allow pulling stats once and disconnecting.
Adds a `stream` query param to the stats API which allows API users to
only collect one stats entry and disconnect instead of keeping the
connection alive to stream more stats.

Also adds a `--no-stream` flag to `docker stats` which does the same

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:06:55 +00:00
Sven Dowideit 5b8040c935 spelling fix from Marc MERLIN
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:55 +00:00
David Calavera bbfd8f5e04 Use git url fragment to specify reference and dir context.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2017-06-02 00:06:55 +00:00
Lars Kellogg-Stedman c6bcaacce7 journald log driver: use CONTAINER_ID field for container id
This patch modifies the journald log driver to store the container ID in
a field named CONTAINER_ID, rather than (ab)using the MESSAGE_ID field.
Additionally, this adds the CONTAINER_ID_FULL field containing the
complete container ID and CONTAINER_NAME, containing the container name.

When using the journald log driver, this permits you to see log messages
from a particular container like this:

    # journalctl CONTAINER_ID=a9238443e193

Example output from "journalctl -o verbose" includes the following:

    CONTAINER_ID=27aae7361e67
    CONTAINER_ID_FULL=27aae7361e67e2b4d3864280acd2b80e78daf8ec73786d8b68f3afeeaabbd4c4
    CONTAINER_NAME=web

Closes: #12864
Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
2017-06-02 00:06:55 +00:00
HuKeping 16d979a292 Feature: option for disable OOM killer
Add cgroup support for disable OOM killer.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2017-06-02 00:06:55 +00:00
Jessica Frazelle 109f9996a9 option to configure cgroups
Signed-off-by: Jessica Frazelle <jess@docker.com>
2017-06-02 00:06:55 +00:00
Jessica Frazelle 734430c44c Add docs for `--exec-opt` and setting `native.cgroupdriver`.
update man pages.
update bash completion.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2017-06-02 00:06:55 +00:00
buddhamagnet 63193b17b1 add support for exclusion rules in dockerignore
Signed-off-by: Dave Goodchild <buddhamagnet@gmail.com>
2017-06-02 00:06:55 +00:00
Ed Costello fcf01194a9 Copy edits for typos
Signed-off-by: Ed Costello <epc@epcostello.com>
2017-06-02 00:06:55 +00:00
David Calavera 72f4a6bc1c Document the extra `depth` argument in git contexts.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2017-06-02 00:06:55 +00:00
Tristan Carel 3f2bc86a4f Fix typo in builder reference
Signed-off-by: Tristan Carel <tristan.carel@gmail.com>
2017-06-02 00:06:54 +00:00
Rick Wieman acc0eac695 Makes headings in documentation consistent
Fixes #10673.

Signed-off-by: Rick Wieman <git@rickw.nl>
2017-06-02 00:06:54 +00:00
Dan Walsh 33e6a5b9c5 Add journald as a supported logger for containers
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2017-06-02 00:06:54 +00:00
Jeff Nickoloff 8bf56348e9 Update builder.md
Single value labels do not work in 1.6 and multi-label instructions only work when separated by non-EOL whitespace.
I also added an example snip from the inspect output with the labels that are included in this guide.

Signed-off-by: Jeff Nickoloff <jeff@allingeek.com>
2017-06-02 00:06:54 +00:00
Shijiang Wei 66d3021b49 Remove some unsupported instructions in the docs.
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2017-06-02 00:06:54 +00:00
Lei Jitang 6c60a3415c Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:06:54 +00:00
Arnaud Porterie f00c5d0720 Add -H|--human flag to `docker history`
Add a flag to print sizes and dates in human readable format.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2017-06-02 00:06:54 +00:00
Sylvain Baubeau 7604419278 Allow specifying a default gateway for bridge networking
Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
2017-06-02 00:06:54 +00:00
Doug Davis 9dd7c2c70d Add .docker/config.json and support for HTTP Headers
This PR does the following:
- migrated ~/.dockerfg to ~/.docker/config.json. The data is migrated
  but the old file remains in case its needed
- moves the auth json in that fie into an "auth" property so we can add new
  top-level properties w/o messing with the auth stuff
- adds support for an HttpHeaders property in ~/.docker/config.json
  which adds these http headers to all msgs from the cli

In a follow-on PR I'll move the config file process out from under
"registry" since it not specific to that any more. I didn't do it here
because I wanted the diff to be smaller so people can make sure I didn't
break/miss any auth code during my edits.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:54 +00:00
Qiang Huang 39840874a3 Add cpuset-mems support for docker build
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:54 +00:00
Qiang Huang 84861b2109 add support for cpuset.mems
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:54 +00:00
wonderflow 2040dff996 fix memory stats display document
Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
2017-06-02 00:06:54 +00:00
Lei Jitang cae7221b8d Add docker exec run a command in privileged mode
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:06:54 +00:00
Lei Jitang 3ca275df6d Add `-u|--user` flag to docker exec for running command as a different user
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:06:54 +00:00
jianbosun a878ece032 change memory usage display
using standard unix postfixes add unit test for display
also change doc for memory usage display change
for example GiB will be GB

Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
2017-06-02 00:06:54 +00:00
Bryan Boreham 07ee4d5ec2 Add a note about PID 1 not terminating on SIGINT/SIGTERM.
Also re-arranged the description of CTRL-c to make it clearer.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2017-06-02 00:06:54 +00:00
Eric Windisch b22aaac047 HTTPS URLs for docs top-level & man pages
This updates all of docs outside of sources.

Signed-off-by: Eric Windisch <eric@windisch.us>
2017-06-02 00:06:54 +00:00
Deng Guangxing d5fb91f48c 'docker rmi -f IMAGE_ID' untag all names and delete the image
If an image has been tagged to multiple repos and tags, 'docker
rmi -f IMAGE_ID' will just untag one random repo instead of
untagging all and deleting the image. This patch implement
this. This commit is composed of:

        *untag all names and delete the image

        *add test to this feature

        *modify commandline/cli.md to explain this

Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
2017-06-02 00:06:53 +00:00
Vincent Batts c121c24125 devmapper: storage-opt override for udev sync
This provides an override for forcing the daemon to still attempt
running the devicemapper driver even when udev sync is not supported.

Intended to be a very clear impairment for those choosing to use it. If
udev sync is false, there will still be an error in the daemon logs,
even when the override is in place. The docs have an explicit WARNING.

Including link to the docs for users that encounter this daemon error
during an upgrade.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2017-06-02 00:06:53 +00:00
Ahmet Alp Balkan 298268dd0a cli: Better wording for daemon --log-driver
This flag is passed to the daemon CLI. In my opinion, "Container's
logging driver" is not accurate and refers to 'one container'.

Also the `syslog` driver was missing from the list. Having the list
of all logging drivers won't scale here (should be <80 chars per line)
and we have `rotation` driver coming up in the pipeline as well (gh11485).

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2017-06-02 00:06:53 +00:00
Tibor Vass 31e77481ff Rebase + some fixes
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-02 00:06:53 +00:00
David Young 6ad4157d89 Refine document by review comments
Signed-off-by: David Young <yangboh@cn.ibm.com>
2017-06-02 00:06:53 +00:00
David Young b43ebd8449 Add comment column in docker history command output
Signed-off-by: David Young <yangboh@cn.ibm.com>
2017-06-02 00:06:53 +00:00
Yan Feng cd83db8e07 Fix a typo in /doc/sources/reference/run.md
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
2017-06-02 00:06:53 +00:00
Mary Anthony 959ae3c211 Carry PR 12008 for contributor
Closes #8040
Remove a tic for the hawk

Signed-off-by: Mary Anthony <mary@docker.com>
2017-06-02 00:06:53 +00:00
Yan Feng 4836b6041a Fix 2 typos in /doc/sources/reference/run.md
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
2017-06-02 00:06:53 +00:00
Deng Guangxing 850a1672bb docker info show logging driver info
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
2017-06-02 00:06:53 +00:00
Simei He 4f146e1a81 fix the space thing.
Signed-off-by: Simei He <hesimei@zju.edu.cn>
2017-06-02 00:06:53 +00:00
Simei He 097e382e78 minor edits.
Signed-off-by: Simei He <hesimei@zju.edu.cn>
2017-06-02 00:06:53 +00:00
dalanlan a4c88adc4d fix issue #11676 #11754, disable RLIMIT_AS,edit DOCKER_OPTS
Signed-off-by: Simei He <hesimei@zju.edu.cn>
2017-06-02 00:06:53 +00:00
Deng Guangxing e2ecc5c6de fix typo in cli.md
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
2017-06-02 00:06:53 +00:00
Sebastiaan van Stijn 48add9c908 docs: fix bullet list and missing label filter
Some bullet lists didn't render as bullet-lists because
of a missing newline.

Also added missing "label" filter for `docker ps` and
slightly re-worded the header above the supported filters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:06:53 +00:00
Doug Davis efc478e33c Add support for more advanced ${xxx:...} syntax
Just ${xxx:+...} and ${xxx:-...} for now

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:52 +00:00
Sebastiaan van Stijn 07995c4ef3 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>
2017-06-02 00:06:52 +00:00
Harry Zhang 5ed0d9c3de Revison the some columns to make table clearer
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
2017-06-02 00:06:52 +00:00
Harry Zhang 5b000494ee Remove dupllicated prefix to make table shorter & fix bugs
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
2017-06-02 00:06:52 +00:00
cheney90 0864264159 Add capabilities list information table.
Signed-off-by: Chen Qiu <21321229@zju.edu.cn>
2017-06-02 00:06:52 +00:00
Daniel, Dao Quang Minh 729035faff 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>
2017-06-02 00:06:52 +00:00
Ankush Agarwal 7ac28ecb2c Explain --net=host option usage
Fixes #11630

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2017-06-02 00:06:52 +00:00
John Willis e1cbe1c398 #11465 Add additional doc for locagi registries onn pull command
Signed-off-by: John Willis <john.willis@docker.com>
2017-06-02 00:06:52 +00:00
Ankush Agarwal 5dad1f409f Add Glossary to documentation
Closes #11057

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2017-06-02 00:06:52 +00:00
Michael West 229fa7b7b9 Add a missing definite article
Signed-off-by: Michael West <mwest@mdsol.com>
2017-06-02 00:06:52 +00:00
Michael West 443da2a625 Add man pages generation instructions.
Signed-off-by: Michael West <mwest@mdsol.com>
2017-06-02 00:06:52 +00:00
Mary Anthony fb7eb87b94 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>
2017-06-02 00:06:52 +00:00
Mary Anthony c4323175d9 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>
2017-06-02 00:06:52 +00:00
Ankush Agarwal bce6adadff 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>
2017-06-02 00:06:52 +00:00
Doug Davis d25b8ec297 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>
2017-06-02 00:06:51 +00:00
Qiang Huang 7618ff84f8 add cpuset and examples to run.md
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:51 +00:00
Qiang Huang 645b49d05b 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>
2017-06-02 00:06:51 +00:00
jimmyxian 653fdbc2f8 fix docker ps help message
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2017-06-02 00:06:51 +00:00
Natalie Parker 886b571641 Added missing code example in the RM command reference of command to delete all stopped containers
Signed-off-by: Natalie Parker <nparker@omnifone.com>
2017-06-02 00:06:51 +00:00
sidharthamani 72bb856565 add syslog driver
Signed-off-by: wlan0 <sid@rancher.com>
2017-06-02 00:06:51 +00:00
Doug Davis f32b6eb23c 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>
2017-06-02 00:06:51 +00:00
Peter Waller e9942aeb8a 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>
2017-06-02 00:06:51 +00:00
Lloyd Dewolf f672cb24cb 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>
2017-06-02 00:06:51 +00:00
Mary Anthony fc39612aaa 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>
2017-06-02 00:06:51 +00:00
Todd Whiteman 698b8d3ed0 docs: cli: reorder rename command to be in alphabetical order
Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
2017-06-02 00:06:51 +00:00
Harald Albers fe7a340316 Remove 'name' filter from docker events documentation
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:06:51 +00:00
Vishnu Kannan d3a6b5adff Adding integration tests for --cgroup-parent feature.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2017-06-02 00:06:50 +00:00
Vishnu Kannan ae117d58d4 Adding documentation for '--cgroup-parent' option.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2017-06-02 00:06:50 +00:00
Brian Goff edc7c88640 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>
2017-06-02 00:06:50 +00:00
Joseph Kern 4aa65f26aa 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>
2017-06-02 00:06:50 +00:00
Mary Anthony f1cb33631f 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>
2017-06-02 00:06:50 +00:00
Mary Anthony ade615a458 Updating with Sven's comments and other tweaks
Signed-off-by: Mary Anthony <mary@docker.com>
2017-06-02 00:06:50 +00:00
Alexander Morozov e30532cf3f Fail docker logs on all logging drivers apart from 'json-file'
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2017-06-02 00:06:50 +00:00
Alexander Morozov 1459501312 Default 'json-file' logging driver and none logging driver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2017-06-02 00:06:50 +00:00
Andy Goldstein 2eaa831df5 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>
2017-06-02 00:06:50 +00:00
Darren Shepherd bfca1f4258 Documentation changes for labels
Signed-off-by: Darren Shepherd <darren@rancher.com>
2017-06-02 00:06:50 +00:00
Darren Shepherd 6b65e560cb Docs changes for labels based on feedback
Signed-off-by: Darren Shepherd <darren@rancher.com>
2017-06-02 00:06:50 +00:00
Sebastiaan van Stijn b5c9f3f13a 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>
2017-06-02 00:06:50 +00:00
Darren Shepherd f39af7acf4 Add docs for container/image labels
Signed-off-by: Darren Shepherd <darren@rancher.com>
2017-06-02 00:06:50 +00:00
Dan Walsh 72b8275268 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)
2017-06-02 00:06:50 +00:00
Tianon Gravi fd05b908be 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>
2017-06-02 00:06:50 +00:00
Sebastiaan van Stijn 3359add082 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>
2017-06-02 00:06:50 +00:00
Sven Dowideit 18fea6ea4a Add some information about the docker build return code
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:49 +00:00
Qiang Huang 40d499514f 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>
2017-06-02 00:06:49 +00:00
Doug Davis 9e6338b24d 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>
2017-06-02 00:06:49 +00:00
Mary Anthony 84883d9d6f Consistency in the restart policy docs
Signed-off-by: Mary Anthony <mary.anthony@docker.com>
2017-06-02 00:06:49 +00:00
Deng Guangxing 90e99d521d 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>
2017-06-02 00:06:49 +00:00
Michal Minar 6098d0f443 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>
2017-06-02 00:06:49 +00:00
Mabin 0be893a352 docs: api-enable-cors is deprecated,updated docs description
Signed-off-by: Mabin <bin.ma@huawei.com>
2017-06-02 00:06:49 +00:00
Doug Davis 10a12ec17e 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>
2017-06-02 00:06:49 +00:00
Rick Wieman 1fcf42aa8d Adds 'name' filter to the CLI reference.
Also sorts the filter and fixes the bullet list.

Signed-off-by: Rick Wieman <git@rickw.nl>
2017-06-02 00:06:49 +00:00
Ahmet Alp Balkan cbbc74c2ac Add system time to /info
This change adds daemon's system time as RFC3339Nano to the `/info` endpoint
and shows in a more readable format (UnixDate) in `docker -D info` output.

I will be using this to fix the clock skew between the remote test host and
the CI machines running `docker events`-related tests as they're using `--since`
and `--until` and the timestamps are not matching when daemon is not on the
same machine.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2017-06-02 00:06:49 +00:00
ChristoperBiscardi 50caf393cb Fix a few code rendering errors in docs
Signed-off-by: ChristoperBiscardi <chris@docker.com>
2017-06-02 00:06:49 +00:00
Srini Brahmaroutu d174e92779 filter events by container name,id or partial id
Addresses #10645

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2017-06-02 00:06:49 +00:00
Lei Jitang 688dc5977b Set default restart policy name to 'no' Closes #10874
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:06:49 +00:00
Lei Jitang a9394281b4 Fix docker start help message
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:06:48 +00:00
Doug Davis 30240ffc53 Add support for 'docker cp' to write to stdout
Closes #10805

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:48 +00:00
Sven Dowideit 863f296d3a Show how to remove a file from the docs s3 bucket, and then invalidate the cloudflare cache
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:48 +00:00
Sven Dowideit 5f274ccd57 fix to cpu.shares documentation by @hqhq
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:48 +00:00
Qiang Huang ef5874f0a9 docs: fix cpu.shares part in man pages
The original description has some mistakes and lack of many useful
information, I rewrite them to make it accurate and complete.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:48 +00:00
Sebastiaan van Stijn 99a47ff600 Docs: add restart-policies to 'Run reference'
This moves some information on restart-policies from
the "command line" page to "run reference".

Also fixes some minor typos and adds a "NOTE"
about --rm and --restart not allowed to be combined.

Also removes inline CSS styles from tables,
which will be styled by the stylesheet, and fixes
some minor MarkDown errors (`<` -> &lt;)

depends on https://github.com/docker/docs-base/pull/1

resolves #11069

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:06:48 +00:00
Doug Davis d69dea3c44 Tell users about how VOLUME initializes the new mount point/volume
Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:48 +00:00
Zhang Wentao 93b07b4a63 docker info display http/https_proxy setting
Signed-off-by: Zhang Wentao <zhangwentao234@huawei.com>
2017-06-02 00:06:48 +00:00
resouer 92b48f975a Add cors header flag and leave boolean flag not changed
Deprecate api-enable-cors

Update docs & man files

Signed-off-by: harry zhang <resouer@163.com>
2017-06-02 00:06:48 +00:00
Doug Davis 71a1c33533 Fix 'docker ps --help' so the options don't span more than one line
and add a testcase to catch this in the future.

While in there I also:
- removed extra periods from the few options that had them (new test)
- made the --filter option consistent across all command

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:48 +00:00
Brian Goff d20a7f0d85 Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:06:48 +00:00
Doug Davis 9574a12bad Support dockerfile and Dockerfile
Closes #10807

Adds support for `dockerfile` ONLY when `Dockerfile` can't be found.
If we're building from a Dockerfile via stdin/URL then always download
it a `Dockerfile` and ignore the -f flag.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:48 +00:00
Sven Dowideit 8ac0e4d95e Notes should be indented
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:48 +00:00
Dmitry Gusev aadc671cf0 Update cli.md
Use `-it` combination in example instead of `-ti`, because this is how it used everywhere in examples.

Update dockerfile_best-practices.md

Fix typo in command name

Signed-off-by: Dmitry Gusev <dmitry.gusev@gmail.com>
2017-06-02 00:06:48 +00:00
Phil Estes 3004c90b51 Correct --add-host documentation regarding host IP address retrieval
Fixes: 10855

The example was actually incorrect for many situations, and also, now
that we have IPv6 we should not that the example is for IPv4 and note
how to find IPv6 addresses.  Also, the device they want to connect to
could be the bridge, or main ethernet device, or some other device
name, so note that as well.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2017-06-02 00:06:48 +00:00
Abin Shahab 91b4e8ad56 Implements stats for lxc driver
Implements stats and fixes stats test.

Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2017-06-02 00:06:47 +00:00
Dan Walsh 99ef14ddab pass --change changes to the import job
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2017-06-02 00:06:47 +00:00
Dan Walsh 6042a6f9a4 add docs for commit --change
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2017-06-02 00:06:47 +00:00
Sven Dowideit 10560b0a8f a little re-writing
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:47 +00:00
Ahmet Alp Balkan b67b89f4cd cli: Add server OS/Arch info to 'version' cmd
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2017-06-02 00:06:47 +00:00
Brian Goff 209f3889e0 Remove CLI doc entry related to API-only function
Closes #10278

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:06:47 +00:00
André Martins d73a9d48f5 Fixes #10457-Pause-and-unpause-accept-multi-containers
Applied multi parameters to pause and unpause.
Created a new test file dedicated for pause commands.
Created a new utility function to get a slice of paused containers.
Updated documentation

Signed-off-by: André Martins <martins@noironetworks.com>
2017-06-02 00:06:47 +00:00
Colm Hally 6ecd6bb069 Group published and exposed ports by contiguous ranges
Signed-off-by: Colm Hally <colmhally@gmail.com>
2017-06-02 00:06:47 +00:00
Bradley Cicenas f99a52dc6c add logpath to docker inspect.
Signed-off-by: Bradley Cicenas <bradley.cicenas@gmail.com>
2017-06-02 00:06:47 +00:00
Ahmet Alp Balkan ee1b138b2b Shorten help messages for docker cmd flags
In order to fit printed messages to fit 80 chars,
rewording messages for `-H` and `--tls` flags.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2017-06-02 00:06:47 +00:00
Doug Davis f91ddd939f Fix 'docker stats' help message
Closes #10771

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:47 +00:00
Jessica Frazelle 16b4b98c34 Removes the feature to pull all image aliases.
It didn't work on v2 anyways. And an image with a lot of aliases was slow to
fetch.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)
2017-06-02 00:06:47 +00:00
Doug Davis 3820b31267 Use newer help out for 'docker' and 'docker run'
Closes #10828

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:47 +00:00
Peter Salvatore e2ac0fc917 Clean up explanation of doc branches.
Signed-off-by: Peter Salvatore <peter@psftw.com>
2017-06-02 00:06:47 +00:00
Arnaud Porterie 8c6610787a Update docs for HTTP_PROXY
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2017-06-02 00:06:46 +00:00
Sven Dowideit 2202790fcd Documentation on boolean flags is wrong #10517
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:46 +00:00
Michael A. Smith 95fe3a1a93 Distinguish ENV from setting environment inline
It's ambiguous to say that `ENV` is _functionally equivalent to prefixing the command with `<key>=<value>`_. `ENV` sets the environment for all future commands, but `RUN` can take chained commands like `RUN foo=bar bash -c 'echo $foo' && bash -c 'echo $foo $bar'`. Users with a solid understanding of `exec` may grok this without confusion, but less experienced users may need this distinction.

Signed-off-by: Michael A. Smith <msmith3@ebay.com>

Improve Environment Handling Descriptions

- Link `ENV` and `Environment Replacement`
- Improve side-effects of `ENV` text
- Rearrange avoiding side effects text

Signed-off-by: Michael A. Smith <msmith3@ebay.com>
2017-06-02 00:06:46 +00:00
Alexander Morozov 74279772e5 Fix example about ps and linked containers
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2017-06-02 00:06:46 +00:00
Katie McLaughlin 2fedce8411 Format `awsconfig` sample config correctly
Reflow change in commit 195f3a3f removed newlines in the config format.

This change reverts the sample config to the original formatting, which
matches the actual config format of a `awsconfig` file.

Signed-off-by: Katie McLaughlin <katie@glasnt.com>
2017-06-02 00:06:46 +00:00
Qiang Huang c03b0700a4 update docs for memory and memoryswap
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:46 +00:00
Sven Dowideit e52b4ad35c For now, docker stats appears to be libcontainer only
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:46 +00:00
Sven Dowideit aa33ee11d0 Fix a small spelling error in the dm.blkdiscard docs
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:46 +00:00
Sven Dowideit 89e02d9d88 Docker attach documentation didn't make sense to me
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:46 +00:00
Doug Davis 130c0bf094 Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:46 +00:00
Sven Dowideit c995dee4c1 Spelling mistake in dockerlinks
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:46 +00:00
Chen Hanxiao 2627488a27 docs: change events --since to fit RFC3339Nano
PR6931 changed time format to RFC3339Nano.
But the example in cli.md does not changed.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2017-06-02 00:06:46 +00:00
Doug Davis 37fd964edb Fix docs so WORKDIR mentions it works for COPY and ADD too
The docs around COPY/ADD already mentioned that it will do a relative
copy/add based on WORKDIR, so that part is already ok.  Just needed to
tweak the WORKDIR section since w/o mentioning COPY/ADD it can be misleading.

Noticed by @phemmer

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:46 +00:00
Doug Davis 642218cefa Docker run -e FOO should erase FOO if FOO isn't set in client env
See #10141 for more info, but the main point of this is to make sure
that if you do "docker run -e FOO ..." that FOO from the current env
is passed into the container.  This means that if there's a value, its
set.  But it also means that if FOO isn't set then it should be unset in
the container too - even if it has to remove it from the env.  So,
   unset HOSTNAME
   docker run -e HOSTNAME busybox env
should _NOT_ show HOSTNAME in the list at all

Closes #10141

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:45 +00:00
Michael Crosby 3296ada2ed Update to docker stats documentation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-02 00:06:45 +00:00
Michael Crosby 9da6238f41 Add documentation for stats feature
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-02 00:06:45 +00:00
Sven Dowideit ff12640c2b An initial quick import of documentation from Compose, Machine and Swarm
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:45 +00:00