Commit Graph

181 Commits

Author SHA1 Message Date
d0ebaa81e8 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: e98e4a71110fd33852bb755a9b8b4ebc9df904db
Component: engine
2016-11-08 04:55:27 -08:00
df125f380f Merge pull request #27992 from Microsoft/jjh/minapitoinfo
Adds `MinAPIVersion` to docker version
Upstream-commit: 2d4203222574623b10d94817b9959a08698f516b
Component: engine
2016-11-08 15:49:33 -08:00
e349632310 Adds minimum API version to version
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d29995bb8481a18fd00b10fe49f2960ee8136619
Component: engine
2016-11-07 21:20:00 -08:00
2a49113fdc Add --tty to docker service create/update
This fix tries to add `--tty` to `docker service create/update`. As was
specified in 25644, `TTY` flag has been added to SwarmKit and is
already vendored.

This fix add `--tty` to `docker service create/update`.

Related document has been updated.

Additional integration tests has been added.

This fix fixes 25644.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 599be5a551bbadf23d76677c7d54c338901781f6
Component: engine
2016-11-07 16:42:32 -08:00
c8300bf35f Windows: Add cpu count option
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 4e15420b9be50ddd7fa65e5c7f9b732777f9cc35
Component: engine
2016-11-04 13:38:50 -07:00
04676aa104 docs: update for new secopts struct in GET /info
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e6ec90608ca06431920afa6d4c56130af9c02a28
Component: engine
2016-11-04 19:25:51 +01:00
133eec9cfa Add --cpus flag to control cpu resources
This fix tries to address the proposal raised in 27921 and add
`--cpus` flag for `docker run/create`.

Basically, `--cpus` will allow user to specify a number (possibly partial)
about how many CPUs the container will use. For example, on a 2-CPU system
`--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share.

This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay
have a concept of NanoCPUs for tasks. The `--cpus` flag will translate
the number into reused `NanoCPUs` to be consistent.

This fix adds integration tests to cover the changes.

Related docs (`docker run` and Remote APIs) have been updated.

This fix fixes 27921.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 846baf1fd3efcbfbf9d3eb99e436ca9a59d3e185
Component: engine
2016-11-04 09:43:10 -07:00
062414bb0e fix frontmatter keywords value type (string, instead of []string) in /docs/reference
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 248c699ec88bb249ce9fd03001d13f29ac0b4b99
Component: engine
2016-11-03 15:48:30 -07:00
e11e25579b added node ip autodetection
Manager now auto-detects the address that an agent connects to the cluster
from and stores it. This is useful for many kinds of internal cluster
management tools.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 9bcf623719104fbd196ab0ca14af48f790980499
Component: engine
2016-11-03 08:10:14 -07:00
0be42defbd Merge pull request #24698 from jhorwit2/jah/clist-health-filter-format
Fixes #24022 - Adds container health support to docker ps filter/format
Upstream-commit: 515e5dade7a006dbd2c42880f1af695da22ece60
Component: engine
2016-10-29 06:56:06 +02:00
4e9b278e51 Merge pull request #27840 from estesp/add-userns-status-to-info
Add "userns" to `docker info` security options output
Upstream-commit: 1fb9c4e89188f48c79889f6128fdec865bed467d
Component: engine
2016-10-29 02:58:34 +02:00
68b003581b Add "userns" to docker info security options output
If user namespaces is enabled on the daemon, reveal that via docker info
by adding "userns" to the list of security options reported by the
info endpoint.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: ae74092e450f1f2665b90257b65513cc0c19702f
Component: engine
2016-10-28 19:16:57 -04:00
5b866e7f54 Adds container health support to docker ps filter
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: 1a149a0ea59b6653e0ba14599476bfe19c4c33f3
Component: engine
2016-10-28 15:43:04 -04:00
ecffd5b73a api: add TypeTmpfs to api/types/mount
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 18768fdc2e76ec6c600c8ab57d2d487ee7877794
Component: engine
2016-10-28 08:38:32 +00:00
3affb6aba8 Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
Upstream-commit: 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
Component: engine
2016-10-26 11:33:06 -04:00
b63aa05761 Merge pull request #27702 from tonistiigi/net-builder0
add --network option for docker build
Upstream-commit: 62ff3e90835c3c572051afbbbac53303e57a5c89
Component: engine
2016-10-25 21:50:33 -07:00
29210e7b5b add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 60813af7aeea819ca228b6b1d6f4888969b95da3
Component: engine
2016-10-25 10:25:36 -07:00
4fb550ce0f add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 7e24c16086a9a4f38e241e51837f2be4877c04a6
Component: engine
2016-10-25 06:43:54 +00:00
9a299b360f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7781a1bf0fef748877326632b88e92fbf3c90daa
Component: engine
2016-10-24 15:20:01 -07:00
04894a8f04 Merge pull request #27596 from aaronlehmann/rolling-restart
Add force option to service update
Upstream-commit: 9058ec3be5edaa313caa02371ebe7d7ac64f2faa
Component: engine
2016-10-22 13:37:12 +02:00
39b84d5fbe Add force option to service update
Currently, there's no way to restart the tasks of a service without
making an actual change to the service. This leads to us giving awkward
workarounds as in
https://github.com/docker/docker.github.io/pull/178/files, where we tell
people to scale a service up and down to restore balance, or make
unnecessary changes to trigger a restart.

This change adds a --force option to "docker service update", which
forces the service to be updated even if no changes require that.

Since rolling update parameters are respected, the user can use
"docker service --force" to do a rolling restart. For example, the
following is supported:

   docker service update --force --update-parallelism 2 \
   --update-delay 5s myservice

Since the default value of --update-parallelism is 1, the default
behavior is to restart the service one task at a time.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c9fdf9abf8d6443598808809b900d96e04adfcb1
Component: engine
2016-10-21 17:43:27 -07:00
871253dbbe Update cURL example for cURL 7.40 differences
cURL 7.50 changed the validation for URL's
when using socket connections. cURL 7.4x
did not expect a hostname, whereas cURL
7.5x and above _requires_ a hostname.

See https://github.com/curl/curl/issues/936

This updates the example to take both
versions into account, because cURL 7.4x
is still widely used by distros.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2e0d6e6be2294ef2561e8c3b5f750fd814536268
Component: engine
2016-10-21 11:40:58 -07:00
3b96eed08f Update docker_remote_api.md
See https://github.com/docker/docker/issues/26099#issuecomment-245007539

Signed-off-by: Gerwim Feiken <g.feiken@tfe.nl>
Upstream-commit: 587b186f85383f98f5475b8c16b883553299b525
Component: engine
2016-10-21 11:34:08 -07:00
1a658fb45c add missing changes in API v1.25 (prune) to docker_remote_api.md
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: afb21776313eb88b7ca691e224832ddb28cb2bb3
Component: engine
2016-10-21 01:33:08 +00:00
63025d814f Merge pull request #27560 from mstanleyjones/sync_docs_master
Sync docker/docker refs with files mistakenly edited in docker.github.io repo
Upstream-commit: 790629c02168f712884f181a9392df36de7abc20
Component: engine
2016-10-20 13:42:40 -07:00
2f7fc91dd4 Merge pull request #27470 from runcom/expose-exec-pid
record pid of exec'd process
Upstream-commit: 13fd75c3dd18e6d57b6b28097fd7e0d0989c1b9e
Component: engine
2016-10-20 21:36:21 +02:00
b2f3f16f09 Sync docker/docker refs with files mistakenly edited in docker.github.io repo
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 3b36f02c03ec050aa46f9a01cd2d6c60ffd93652
Component: engine
2016-10-20 10:51:30 -07:00
5391fe7296 change created description in api change
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c37d6bf2a08c9ae05ebf16522b33b95d389642c1
Component: engine
2016-10-21 00:10:16 +08:00
dd35c23542 record pid of exec'd process
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 18083481361a4053d1081a201120a916239fc0ed
Component: engine
2016-10-20 17:06:11 +02:00
6b3066953c Show volume options for docker volume inspect
This fix tries to address the issue raised in 25545 where
volume options at the creation time is not showed up
in `docker volume inspect`.

This fix adds the field `Options` in `Volume` type and
persist the options in volume db so that `volume inspect`
could display the options.

This fix adds a couple of test cases to cover the changes.

This fix fixes 25545.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9ce8aac55e6df65bbf49c682374871a94d379bf3
Component: engine
2016-10-20 05:14:27 -07:00
bf1e1cd730 Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
Upstream-commit: e03bf1221ee2c863f25a57af4d415e2d8ff4f26c
Component: engine
2016-10-19 12:39:25 -02:00
a9ca455bda add creation timestamp to docker network inspect
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: b5bb7de5d26a49c8a3789cfcaeb8ff3e6153e708
Component: engine
2016-10-19 06:38:39 +00:00
c0eebabe70 Service update failure thresholds and rollback
This adds support for two enhancements to swarm service rolling updates:

- Failure thresholds: In Docker 1.12, a service update could be set up
  to either pause or continue after a single failure occurs. This adds
  an --update-max-failure-ratio flag that controls how many tasks need to
  fail to update for the update as a whole to be considered a failure. A
  counterpart flag, --update-monitor, controls how long to monitor each
  task for a failure after starting it during the update.

- Rollback flag: service update --rollback reverts the service to its
  previous version. If a service update encounters task failures, or
  fails to function properly for some other reason, the user can roll back
  the update.

SwarmKit also has the ability to roll back updates automatically after
hitting the failure thresholds, but we've decided not to expose this in
the Docker API/CLI for now, favoring a workflow where the decision to
roll back is always made by an admin. Depending on user feedback, we may
add a "rollback" option to --update-failure-action in the future.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6d4b527699b3e95d21d79f6b327252a6cdaca5b0
Component: engine
2016-10-18 10:09:50 -07:00
9fc27540de Add config parameter to change per-container stop timeout during daemon shutdown
This fix tries to add a flag `--stop-timeout` to specify the timeout value
(in seconds) for the container to stop before SIGKILL is issued. If stop timeout
is not specified then the default timeout (10s) is used.

Additional test cases have been added to cover the change.

This fix is related to #22471. Another pull request will add `--shutdown-timeout`
to daemon for #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e66d2108911a2fad016205bdd6bf181f7e822c1c
Component: engine
2016-10-17 12:28:46 -07:00
2d39abd104 Add KernelMemory to API changelog
Commit 9bd8a9b66bb493026599d22c7637909cb460d039
added KernelMemory to the API, but forgot
to include this in the API changelog.

This adds the missing entry in the API
changelog.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f988a9ce5e5926b211c7e762b67cff8e9dbac380
Component: engine
2016-10-16 19:42:35 -07:00
9fe833df60 Convert Markdown frontmatter to YAML
Some frontmatter such as the weights, menu stuff, etc is no longer used
'draft=true' becomes 'published: false'

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: b30609446d212624e3d4ce814c70130b75c552a0
Component: engine
2016-10-14 15:44:55 -07:00
e61236d868 Inspect populate image OSVersion
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b7f537e811d40244c76da93319e3f6f30c4c88e3
Component: engine
2016-10-06 11:46:24 -07:00
54d60e9c2d Revert "Add direct link to event chart image"
This reverts commit 86de72fef244b3fe209e5793deb40fb26f5b318e.

The link seems malformed and is breaking the overall docs build.

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 23207def7c4a390fe3549f467413c187cc146fee
Component: engine
2016-09-29 10:16:41 -07:00
48a609d72c Add a new "is-task" ps filter
This makes it easier to list containers that are part of a task
(swarm mode) and those who are not.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5280ba83e55b94b9d4973a15381e18eb10920233
Component: engine
2016-09-28 12:45:30 +02:00
be83d1256c Merge pull request #26074 from allencloud/return-err-when-remove-container-in-progress
make client side know container removal in progress
Upstream-commit: 97d4b9c46528c2d263a448658a6cf78ffd943075
Component: engine
2016-09-27 18:48:03 +02:00
4ab44ced86 Merge pull request #26255 from Microsoft/jjh/xenon-test-infrastructure
Add isolation to info - enables Hyper-V containers CI bring-up
Upstream-commit: b881148385685f3c538a3a085207bfdf30ae9213
Component: engine
2016-09-27 18:46:51 +02:00
672761b64e make client side know container removal in progress
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9a58f298d182945eb2b820e5e3539b754fdaa751
Component: engine
2016-09-27 18:06:54 +08:00
6352e3e776 API return network-list if no network-name or id is provided
When calling the /networks/ endpoint with a trailing
slash, the default network was returned.

This changes the endpoint to return the list of networks
instead (same response as `/networks` without trailing
slash).

Also updated the description for GetNetworkByName to
explain that the "default" network is returned if
no name or id is provided.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ad4bf0a533f8851b0ddccb56fe3b457819f6146
Component: engine
2016-09-26 21:44:34 +02:00
a034d841ce Add isolation to info
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c4e169727474f24cb0eddea15b94aaa2bfbb3281
Component: engine
2016-09-23 12:13:29 -07:00
cc3c0d322a Implement build cache based on history array
Based on work by KJ Tsanaktsidis

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: KJ Tsanaktsidis <kjtsanaktsidis@gmail.com>
Upstream-commit: 690882c2e79c3f3742c709cf158584e61594ba00
Component: engine
2016-09-23 11:30:06 -07:00
a0b2adc110 Merge pull request #26516 from yongtang/26453-build-bad-syntax
Check bad syntax on dockerfile before building.
Upstream-commit: 72f556a9ff1043a4188e8eeef892d8a0ba4fe34f
Component: engine
2016-09-23 12:24:20 +02:00
9e4c8c252a Update documentation and change log to include the preliminary validation of dockerfile.
This commit updates documentation and change log to include
the preliminary validation of the dockerfile before instructions
in dockerfile is run one-by-one.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e33dea5b40a52c5dcda682a1a292584ae6bff00d
Component: engine
2016-09-22 14:33:37 -07:00
a262e6d191 Fix incorrectly named API options
This renames `MaximumIOps` to `IOMaximumBandwidth`,
and `MaximumIOBps` to `IOMaximumIOps` to match
the actual code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 36a25bdbe4d973aef308fa11b450264dae1bc0b4
Component: engine
2016-09-20 13:51:55 +02:00
69bead6193 Add direct link to event chart image
This adds a direct link to the event chart image
so that the full-resolution image can be "zoomed"
in to.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 86de72fef244b3fe209e5793deb40fb26f5b318e
Component: engine
2016-09-14 23:16:32 +02:00
06b2219a87 Add new HostConfig field, Mounts.
`Mounts` allows users to specify in a much safer way the volumes they
want to use in the container.
This replaces `Binds` and `Volumes`, which both still exist, but
`Mounts` and `Binds`/`Volumes` are exclussive.
The CLI will continue to use `Binds` and `Volumes` due to concerns with
parsing the volume specs on the client side and cross-platform support
(for now).

The new API follows exactly the services mount API.

Example usage of `Mounts`:

```
$ curl -XPOST localhost:2375/containers/create -d '{
  "Image": "alpine:latest",
  "HostConfig": {
    "Mounts": [{
      "Type": "Volume",
      "Target": "/foo"
      },{
      "Type": "bind",
      "Source": "/var/run/docker.sock",
      "Target": "/var/run/docker.sock",
      },{
      "Type": "volume",
      "Name": "important_data",
      "Target": "/var/data",
      "ReadOnly": true,
      "VolumeOptions": {
	"DriverConfig": {
	  Name: "awesomeStorage",
	  Options: {"size": "10m"},
	  Labels: {"some":"label"}
	}
      }]
    }
}'
```

There are currently 2 types of mounts:

  - **bind**: Paths on the host that get mounted into the
    container. Paths must exist prior to creating the container.
  - **volume**: Volumes that persist after the
    container is removed.

Not all fields are available in each type, and validation is done to
ensure these fields aren't mixed up between types.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fc7b904dced4d18d49c8a6c47ae3f415d16d0c43
Component: engine
2016-09-13 09:55:35 -04:00