Commit Graph

341 Commits

Author SHA1 Message Date
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
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
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
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
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
934492366e Adds 'name' filter to the CLI reference.
Also sorts the filter and fixes the bullet list.

Signed-off-by: Rick Wieman <git@rickw.nl>
Upstream-commit: 1fcf42aa8d
Component: cli
2017-06-02 00:06:49 +00:00
db711ef85c 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>
Upstream-commit: cbbc74c2ac
Component: cli
2017-06-02 00:06:49 +00:00
91fa2d600e filter events by container name,id or partial id
Addresses #10645

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: d174e92779
Component: cli
2017-06-02 00:06:49 +00:00
8397f0209d Set default restart policy name to 'no' Closes #10874
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 688dc5977b
Component: cli
2017-06-02 00:06:49 +00:00
46e22930ae Fix docker start help message
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: a9394281b4
Component: cli
2017-06-02 00:06:48 +00:00
4ffbcead4d Add support for 'docker cp' to write to stdout
Closes #10805

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 30240ffc53
Component: cli
2017-06-02 00:06:48 +00:00
0f5cfa4975 fix to cpu.shares documentation by @hqhq
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 5f274ccd57
Component: cli
2017-06-02 00:06:48 +00:00
54ef332e9a 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>
Upstream-commit: 99a47ff600
Component: cli
2017-06-02 00:06:48 +00:00
237e7669a6 docker info display http/https_proxy setting
Signed-off-by: Zhang Wentao <zhangwentao234@huawei.com>
Upstream-commit: 93b07b4a63
Component: cli
2017-06-02 00:06:48 +00:00
805c1892c0 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>
Upstream-commit: 92b48f975a
Component: cli
2017-06-02 00:06:48 +00:00
0c176b600d 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>
Upstream-commit: 71a1c33533
Component: cli
2017-06-02 00:06:48 +00:00
d780896594 Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d20a7f0d85
Component: cli
2017-06-02 00:06:48 +00:00
af66fddb35 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>
Upstream-commit: 9574a12bad
Component: cli
2017-06-02 00:06:48 +00:00
ba91e1ac06 Notes should be indented
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 8ac0e4d95e
Component: cli
2017-06-02 00:06:48 +00:00
20da3725ba 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>
Upstream-commit: aadc671cf0
Component: cli
2017-06-02 00:06:48 +00:00
d3e248b539 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)
Upstream-commit: 3004c90b51
Component: cli
2017-06-02 00:06:48 +00:00
0ebeff7671 Implements stats for lxc driver
Implements stats and fixes stats test.

Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: 91b4e8ad56
Component: cli
2017-06-02 00:06:47 +00:00
81765c1180 pass --change changes to the import job
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 99ef14ddab
Component: cli
2017-06-02 00:06:47 +00:00
699ee445ac 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)
Upstream-commit: 6042a6f9a4
Component: cli
2017-06-02 00:06:47 +00:00
ea73b522bd cli: Add server OS/Arch info to 'version' cmd
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: b67b89f4cd
Component: cli
2017-06-02 00:06:47 +00:00
c047794822 Remove CLI doc entry related to API-only function
Closes #10278

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 209f3889e0
Component: cli
2017-06-02 00:06:47 +00:00
b5d06e072c 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>
Upstream-commit: d73a9d48f5
Component: cli
2017-06-02 00:06:47 +00:00
9ba45bbe34 Group published and exposed ports by contiguous ranges
Signed-off-by: Colm Hally <colmhally@gmail.com>
Upstream-commit: 6ecd6bb069
Component: cli
2017-06-02 00:06:47 +00:00
b8f84c577a add logpath to docker inspect.
Signed-off-by: Bradley Cicenas <bradley.cicenas@gmail.com>
Upstream-commit: f99a52dc6c
Component: cli
2017-06-02 00:06:47 +00:00
7719cf0e1f 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>
Upstream-commit: ee1b138b2b
Component: cli
2017-06-02 00:06:47 +00:00