Commit Graph

6940 Commits

Author SHA1 Message Date
c49d8409df Merge pull request #34594 from tizhou86/master
Fix typo in docs/api/version-history.md
Upstream-commit: 76a7f05795df38cc5a720fa52d37f4a2bc23b015
Component: engine
2017-08-22 06:19:46 -07:00
d06d19b543 Fixed typo in docs/api/version-history.md
Signed-off-by: Ti Zhou <tizhou1986@gmail.com>
Upstream-commit: a35bfd0b43b132754c9a06d69802d69bddfd829f
Component: engine
2017-08-22 16:47:08 +08:00
3c66acc139 Dropped hyphen in bind mount where appropriate
Signed-off-by: Christophe Vidal <kriss@krizalys.com>
Upstream-commit: dffa5d6df2e51556edfbcebc4695fdbc0bcc1a90
Component: engine
2017-08-19 21:25:07 +07:00
eca24fb7b0 Implement none, private, and shareable ipc modes
Since the commit d88fe447df0e8 ("Add support for sharing /dev/shm/ and
/dev/mqueue between containers") container's /dev/shm is mounted on the
host first, then bind-mounted inside the container. This is done that
way in order to be able to share this container's IPC namespace
(and the /dev/shm mount point) with another container.

Unfortunately, this functionality breaks container checkpoint/restore
(even if IPC is not shared). Since /dev/shm is an external mount, its
contents is not saved by `criu checkpoint`, and so upon restore any
application that tries to access data under /dev/shm is severily
disappointed (which usually results in a fatal crash).

This commit solves the issue by introducing new IPC modes for containers
(in addition to 'host' and 'container:ID'). The new modes are:

 - 'shareable':	enables sharing this container's IPC with others
		(this used to be the implicit default);

 - 'private':	disables sharing this container's IPC.

In 'private' mode, container's /dev/shm is truly mounted inside the
container, without any bind-mounting from the host, which solves the
issue.

While at it, let's also implement 'none' mode. The motivation, as
eloquently put by Justin Cormack, is:

> I wondered a while back about having a none shm mode, as currently it is
> not possible to have a totally unwriteable container as there is always
> a /dev/shm writeable mount. It is a bit of a niche case (and clearly
> should never be allowed to be daemon default) but it would be trivial to
> add now so maybe we should...

...so here's yet yet another mode:

 - 'none':	no /dev/shm mount inside the container (though it still
		has its own private IPC namespace).

Now, to ultimately solve the abovementioned checkpoint/restore issue, we'd
need to make 'private' the default mode, but unfortunately it breaks the
backward compatibility. So, let's make the default container IPC mode
per-daemon configurable (with the built-in default set to 'shareable'
for now). The default can be changed either via a daemon CLI option
(--default-shm-mode) or a daemon.json configuration file parameter
of the same name.

Note one can only set either 'shareable' or 'private' IPC modes as a
daemon default (i.e. in this context 'host', 'container', or 'none'
do not make much sense).

Some other changes this patch introduces are:

1. A mount for /dev/shm is added to default OCI Linux spec.

2. IpcMode.Valid() is simplified to remove duplicated code that parsed
   'container:ID' form. Note the old version used to check that ID does
   not contain a semicolon -- this is no longer the case (tests are
   modified accordingly). The motivation is we should either do a
   proper check for container ID validity, or don't check it at all
   (since it is checked in other places anyway). I chose the latter.

3. IpcMode.Container() is modified to not return container ID if the
   mode value does not start with "container:", unifying the check to
   be the same as in IpcMode.IsContainer().

3. IPC mode unit tests (runconfig/hostconfig_test.go) are modified
   to add checks for newly added values.

[v2: addressed review at https://github.com/moby/moby/pull/34087#pullrequestreview-51345997]
[v3: addressed review at https://github.com/moby/moby/pull/34087#pullrequestreview-53902833]
[v4: addressed the case of upgrading from older daemon, in this case
     container.HostConfig.IpcMode is unset and this is valid]
[v5: document old and new IpcMode values in api/swagger.yaml]
[v6: add the 'none' mode, changelog entry to docs/api/version-history.md]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7120976d74195a60334c688a061270a4d95f9aeb
Component: engine
2017-08-14 10:50:39 +03:00
76e753b00b Merge pull request #34287 from thaJeztah/bump-api-version
Bump API version to 1.32
Upstream-commit: 1a0fbc4a6facd35ca93e4eded902e73d0d4b8378
Component: engine
2017-08-01 12:18:26 +02:00
4bac077379 Add API documentation for plugable secret backends
Documents the API changes introduced in

0304c98d85404fe75a1b4a35d3c111931e062f41 and
08f7cf05268782a0dd8e4c41a4cc65fdf78d09f2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c8dad44c326d9d2131f94babbc535e7f442db290
Component: engine
2017-07-28 00:00:53 +02:00
beb3caf7ab Bump API version to 1.32
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 05121d555475b3d7cfa5b29f22dc85262cd1a1a8
Component: engine
2017-07-27 18:50:31 +02:00
0112a044fc Update API history and example response for volume CreatedAt
This adds the new `CreatedAt` field to the API version history
and updates some examples to show this information.

The `CreatedAt` field was implemented in a46f757c4043031379362c5d6b3bad7562ab9fed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 48a83a3a18185e0ad48737d448524670f8fac4bf
Component: engine
2017-07-19 16:18:08 +02:00
5b6e1a1aa3 Service privileges: API docs
This documents the Service privileges
API changes, that were added in:
091b5e68ea735bf4e8ece708bbc8c413a32eab73

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d0a8e73e7b60f61db0c3799643aaccbbf33f3601
Component: engine
2017-07-14 17:04:26 -07:00
322987e0f5 Merge pull request #34065 from allencloud/add-cluster-events-change
add cluster events change in version_history.md
Upstream-commit: e5862d42b372110c4530ba7afb579801ddafd553
Component: engine
2017-07-11 20:28:05 -07:00
b4af05d241 add cluster events change in version_history.md
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e9da15a6603f288a4c0005fc8f4161b45390e26b
Component: engine
2017-07-12 09:25:30 +08:00
3a04c6bfdb add config event in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c8d6477e5a359d30cdf0a59cdbfffc158a1d9388
Component: engine
2017-07-12 08:48:14 +08:00
6d8f8266f4 Fix api-version history
Commit c79c16910c0f3d6e88f2dc6ef609ecc3b02ccef9
inadvertently put these API changes under API 1.31,
but they were added in API 1.30.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dd5e818fabc7edf7fa4d952e62b949b224909d2a
Component: engine
2017-07-10 21:15:02 -07:00
c782cb6c44 Make plugin emit strongly typed, consumable events
Enables other subsystems to watch actions for a plugin(s).

This will be used specifically for implementing plugins on swarm where a
swarm controller needs to watch the state of a plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 72c3bcf2a533a827402945e3a55872e2db4fb024
Component: engine
2017-07-06 14:26:06 -04:00
9691a9deb1 Merge pull request #33941 from thaJeztah/update-api-docs
Add missing API documentatoin for DataPathAddr
Upstream-commit: 9d95740dbfb790b3ea531a363697076ffb97a294
Component: engine
2017-07-05 18:35:45 -07:00
e720e150d4 Add missing API documentatoin for DataPathAddr
COmmit 0307fe1a0bcdc02583a24add41eb783c117bad8c added
a new `DataPathAddr` property to the swarm/init and swarm/join
endpoints. This property was not yet added to the
documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c79c16910c0f3d6e88f2dc6ef609ecc3b02ccef9
Component: engine
2017-07-04 03:11:40 -07:00
643654c2f0 Spelling fixes
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 39bcaee47b8a284a46b761afe218ba7deda0d482
Component: engine
2017-07-03 13:13:09 -07:00
f5f8240661 Set a LastUpdated time in image metadata when an image tag is updated.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 016eea004ba0109d7cd965eab242ed17e4f0f36c
Component: engine
2017-06-26 12:16:26 -07:00
3821f2cd57 Documentation updates for interactive sessions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b8b8a9c837889c8851aade242ab1a1be0a8e7cf4
Component: engine
2017-06-22 15:36:56 -07:00
42c5a6e86e Remove docs (except docs/api), experimental/, contrib/completion, man/
They have been moved to github.com/docker/cli.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b5579a4ce33af4c1f67118e11b5a01008a36d26a
Component: engine
2017-06-14 03:14:46 +00:00
b687d7ca5a Merge pull request #33630 from yongtang/167-cli-network-inspect-scope
Add `scope` filter in `GET /networks/(id or name)`
Upstream-commit: 4310f7da7e6bcd8185bf05e032f9b7321cfa6ea2
Component: engine
2017-06-12 18:27:24 -07:00
99aad7f08b Add scope filter in /networks/<id>
This fix tries to add a `scope` in the query of `/networks/<id>`
(`NetworkInspect`) so that in case of duplicate network names,
it is possible to locate the network ID based on the network
scope (`local`, 'swarm', or `global`).

Multiple networks might exist in different scopes, which is a legitimate case.
For example, a network name `foo` might exists locally and in swarm network.

However, before this PR it was not possible to query a network name `foo`
in a specific scope like swarm.

This fix fixes the issue by allowing a `scope` query in `/networks/<id>`.

Additional test cases have been added to unit tests and integration tests.

This fix is related to docker/cli#167, moby/moby#30897, moby/moby#33561, moby/moby#30242

This fix fixes docker/cli#167

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 158b2a1875cf33f3560dedaeb0149e1fbe54c1ef
Component: engine
2017-06-12 09:54:25 -07:00
cf3b267129 Update docs, completion scripts for disable-legacy-registry
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b8f0eef7338f37104464154ba65aef7db3b9703
Component: engine
2017-06-12 11:04:37 +02:00
aed3533620 Bump API version
With the Moby/Docker split, no decisions have been
made yet how, and when to bump the API version.

Although these decisions should not be lead
by Docker releases, I'm bumping the API version
to not complicate things for now; after this bump
we should make a plan how to handle this in future
(for example, using SemVer for the REST api, and
bump with every change).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7839ff2244a7fcbac0882b1426bbd2c5477c1abe
Component: engine
2017-06-09 14:58:01 +02:00
ae3f3a569b Merge pull request #32122 from allencloud/choose-rpc-code-to-determine-status-code
choose rpc code to determine status code
Upstream-commit: 27ca921db1d2b4f19fa60a5d7994fec29fb2d025
Component: engine
2017-06-09 14:32:24 +02:00
9d1aaaa297 Merge pull request #33572 from hsluoyz/patch-1
Add Casbin plugin to the list of Authorization plugins in docs.
(cherry picked from commit 220831d541bfe9bf566c1038773198d431560dd3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0ad3e3294e74f443130b5e1fb1ef6b31f4f92366
Component: engine
2017-06-09 14:11:36 +02:00
74c45938b0 Merge pull request #32804 from bbodenmiller/patch-1
remove extra word
(cherry picked from commit 9db03bd8cdad3c8804105cb5794ebad5e728f48f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3eaec0071c3ce1b7201e37859afe5bcb78d4f215
Component: engine
2017-06-09 14:06:37 +02:00
25d0a85dce Merge pull request #32791 from djalal/patch-1
fix typo
(cherry picked from commit 32a52716b964373b4ac464052e73ea5da79856c6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fcbd93f52032593cc71b298c00a46fd354356650
Component: engine
2017-06-09 14:06:31 +02:00
aa4ab28f5c Merge pull request #32735 from bhavin192/patch-1
Add note about host-dir in VOLUME
(cherry picked from commit f2fff9d913a8ab0436dd56033189a7c3713a59a2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8fd6547fc3eb67e7efa7efb007ae6a4494cd2bb3
Component: engine
2017-06-09 14:06:25 +02:00
c377be4599 Merge pull request #32724 from PatrickLang/patricklang-win-memory
Adding more on -m and --memory
(cherry picked from commit c3fbca106552f2dadcb89510ff87945b50f36419)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4047a849bd3018f8a8eabf34613a4fca57f818e
Component: engine
2017-06-09 14:06:19 +02:00
6df95bba93 Merge pull request #32684 from scjane/patch-3
Update builder.md
(cherry picked from commit 831066337743fc29ff122fce51afe44b8b3b3ba9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bc66821abbcf50c721ce9b8f52b339fda102d389
Component: engine
2017-06-09 14:06:13 +02:00
9244630a6b choose rpc code to determine status code
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: f257f77c6c13ee851d3b899f8d51628a5dec92db
Component: engine
2017-06-06 10:08:50 +08:00
9d937bfa88 Update deprecated.md for removal of --email flag
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 43239f62bedc4721d27744d21c122622988bb3ae
Component: engine
2017-06-01 17:05:42 +02:00
ee2b1d2417 Docs and manual changes
- for service create on node-local networks

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: d618b56b40aad7e3695583015fe0f6731d12f413
Component: engine
2017-05-17 15:50:28 -07:00
6f26254653 Merge pull request #32237 from jlhawn/update_container_wait
Update Container Wait
Upstream-commit: c053a2069e1c8e99488517071540fb3e526233f3
Component: engine
2017-05-17 02:39:52 +02:00
3923957361 Merge pull request #33152 from cyli/root-ca-rotation-cli-docs
Root CA rotation CLI docs
Upstream-commit: 03efb40cb8bc5f2df68cb9616f55138c2abe29b4
Component: engine
2017-05-17 02:17:27 +02:00
0e311d1c4e Merge pull request #33151 from nwt/push-foreign-layers
Add daemon option to push foreign layers
Upstream-commit: a30ef99e8dd2c3e7a54b6410a5709f61db59c07f
Component: engine
2017-05-17 02:04:31 +02:00
fa44d02011 Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 4921171587c09d0fcd8086a62a25813332f44112
Component: engine
2017-05-16 15:11:39 -07:00
67b57727bd Add daemon option to push foreign layers
The --allow-nondistributable-artifacts daemon option specifies
registries to which foreign layers should be pushed.  (By default,
foreign layers are not pushed to registries.)

Additionally, to make this option effective, foreign layers are now
pulled from the registry if possible, falling back to the URLs in the
image manifest otherwise.

This option is useful when pushing images containing foreign layers to a
registry on an air-gapped network so hosts on that network can pull the
images without connecting to another server.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
Upstream-commit: 67fdf574d5acd6ddccb6ece0ffe0ace1c1608712
Component: engine
2017-05-16 14:36:36 -07:00
4dacea7efb Merge pull request #33144 from nishanttotla/update-swarmkit-platform-structs
Adding Platforms field to TaskSpec Placement
Upstream-commit: 7b7f9a481e21e740263cb43baae9473d888afcba
Component: engine
2017-05-16 15:22:03 -04:00
94be5a4238 Document the swarm root CA rotation CLI command.
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 3adddab957024f0d1f196c207cdb7eee543dda48
Component: engine
2017-05-15 17:21:01 -07:00
357711f859 Merge pull request #33148 from cyli/doc-update-node-cluster-tls-info
Update the CLI docs to display whether a root rotation is in progress
Upstream-commit: f6c00f6e8098eb331435443d70030dfbe5aeaadb
Component: engine
2017-05-16 01:06:08 +02:00
6ca0a8eece Adding Platforms field to TaskSpec
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 1efbe6e8761370bbe8c136928a68323c7d8dbecf
Component: engine
2017-05-15 14:58:20 -07:00
10bae71e4a Merge pull request #33185 from tonistiigi/docs-build-target
docs: add docs for build —target
Upstream-commit: 4dbea104ca7ecaf3b9e7cdd779620f9c4faca818
Component: engine
2017-05-15 22:14:54 +02:00
2850502ebe docs: add docs for build —target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3377664e947979d2609135761a3c559fe47ef758
Component: engine
2017-05-15 09:56:53 -07:00
04ea6ad3f6 Merge pull request #32502 from tonistiigi/git-allow-pr-number
Allow specifying any remote ref in git checkout URLs
Upstream-commit: ba52bb0fd158dcd99ff65d0a422add8ecde01b3e
Component: engine
2017-05-15 09:34:54 -07:00
44195b7547 Merge pull request #33184 from dnephin/doc-arg-before-from
Document arg before from
Upstream-commit: 99b5fadd0ce6edf066d5797f14c0ba452c8ddf23
Component: engine
2017-05-15 13:35:23 +02:00
409ca07fc0 Document arg before from
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 83a4afe2645d2e39cf6b10a86e9e681a7ff06eb2
Component: engine
2017-05-12 18:45:08 -04:00
a00f1ffcd6 Merge pull request #32874 from cpuguy83/metrics_plugins
Add support for metrics plugins
Upstream-commit: 680084b2a2eb1ac1ced2dd4c695fdc469c25dc7f
Component: engine
2017-05-12 15:44:34 -07:00
d7fd55d70a Merge pull request #32993 from cyli/root-rotation-cli
API changes to rotate swarm root CA
Upstream-commit: eb8abc95985bf3882a4a177c409a96e36e25f5b7
Component: engine
2017-05-12 10:12:32 -07:00