Commit Graph

617 Commits

Author SHA1 Message Date
311dc4f8a6 Add progress bar to docker load
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: fae09e25698006a190d14fe64f1576f68431fabf
Component: engine
2016-02-05 02:24:23 -05:00
e109e016c1 Display internal flag on network inspect
Also adds internal network tests for bridge network

Signed-off-by: Chun Chen <ramichen@tencent.com>
Upstream-commit: c199506b59f60ac456cb0448ddd86e6dec92bc0a
Component: engine
2016-02-04 15:28:37 +08:00
43913f9547 Merge pull request #19911 from Microsoft/jstarks/npipe
Windows: Add support for named pipe protocol
Upstream-commit: 83ee24e52b04fd8cf1f7366dff04baa43d89ec49
Component: engine
2016-02-02 15:59:45 -08:00
d7248ffec7 fix error message on version too low
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0fd9b4067d5126a8059dc2821b835d3bde26e7eb
Component: engine
2016-02-02 14:16:15 -08:00
27daf9cbce Windows: Add support for named pipe protocol
This adds an npipe protocol option for Windows hosts, akin to unix
sockets for Linux hosts. This should become the default transport
for Windows, but this change does not yet do that.

It also does not add support for the client side yet since that
code is in engine-api, which will have to be revendored separately.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 0906195fbbd6f379c163b80f23e4c5a60bcfc5f0
Component: engine
2016-02-01 19:46:30 -08:00
fe296e65a0 Remove package daemonbuilder.
Currently, daemonbuilder package (part of daemon) implemented the
builder backend. However, it was a very thin wrapper around daemon
methods and caused an implementation dependency for api/server build
endpoint. api/server buildrouter should only know about the backend
implementing the /build API endpoint.

Removing daemonbuilder involved moving build specific methods to
respective files in the daemon, where they fit naturally.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 9c332b164f1aefa2407706adf59d50495d6e02cb
Component: engine
2016-02-01 09:57:38 -08:00
cb234f712d Merge pull request #19638 from runcom/remove-redunant-function
cleanup and move stuff where needed
Upstream-commit: d695cf8de710ca50f5c2b39727f00bfd4be8e07f
Component: engine
2016-01-30 10:12:38 -05:00
b810382f68 Change log level
Warning should be printed with real `logrus.Warn`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 98f74f8383241d2f0a5ed8b17f7016e24af899fa
Component: engine
2016-01-30 18:46:16 +08:00
7f6eb0a2ca postImagesCreate: move auth config decode when it's needed
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: a7d1aeceec53cfefd72e5b2161c2c57eae20cf55
Component: engine
2016-01-29 14:07:54 +01:00
07e52f456b Merge pull request #19733 from calavera/auth_error_on_post_create
Respond with 401 when there is an unauthorized error from the registry.
Upstream-commit: 0b7acaf4b949ceab3b13d4f91bf7072a1bd76484
Component: engine
2016-01-28 13:44:58 -05:00
860892d919 Respond with 401 when there is an unauthorized error from the registry.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7bca93218291767c5dd8782de0ad630dbcda9995
Component: engine
2016-01-27 13:55:33 -05:00
1b0241a8aa Permit OPTIONS request against any url, fixes #19398
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: ada792047907907fb94c332faf3ad7e1b125e98d
Component: engine
2016-01-23 00:31:08 +00:00
d9d4f4eb39 Remove obsolete comment
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3dc8829a83d72d3a8e1d9b6a88c9e6ff9ecaf4a0
Component: engine
2016-01-19 12:17:40 -08:00
5779f0bfc3 Merge pull request #19420 from clnperez/close-notify-fix
Move closeNotify to fix panic with newer golang
Upstream-commit: b6be6451971afc7798c1aa22ff73d681c4e0019b
Component: engine
2016-01-18 20:08:25 -05:00
88549196d4 Merge pull request #19414 from anusha-ragunathan/postBuild
Make daemonbuilder.Docker leaner.
Upstream-commit: a495c148a5948c372c626c6a4643d361f31374d0
Component: engine
2016-01-18 21:46:49 +01:00
1fa4309fd5 Move closeNotify to fix panic with newer golang
This is happening now due to improvements in net/http:
99fb19194c

To test, change the go version in the Dockerfile:
-ENV GO_VERSION 1.5.3
+ENV GO_VERSION 1.6beta2

More info here: https://github.com/golang/go/issues/14001

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 2df5dafdaf12296fa2bd92ced62ba80da41af744
Component: engine
2016-01-18 14:24:25 -06:00
bd1120dfd8 Make daemonbuilder.Docker leaner.
Currently builder.Backend is implemented by daemonbuilder.Docker{} for
the daemon. This registration happens in the API/server code. However,
this is too implementation specific. Ideally we should be able to specify
that docker daemon (or any other) is implementing the Backend and abstract
the implementation details. So we should remove package daemonbuilder
dependency in build_routes.go

With this change, daemonbuilder.Docker is nothing more than the daemon.
A follow on change will remove the daemonbuilder package and move relevant
methods under daemon, so that API only knows about the backend.

Also cleanup code in api/client/build.go. docker cli always performs build
context tar download for remoteURLs and sends an empty remoteContext. So
remove relevant dead code.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 14215ed5a1900a88a3b17dd7cd566def50bfcbc9
Component: engine
2016-01-18 09:16:11 -08:00
819b85bb3a Add Subnets info for user-defined network
* If user doesn't specify the subnets to create a network, it will pick
  subnets from inside preferred pool. This PR aims to inspect these subnets info

* Add integration tests for docker inspect the subnets.

* docker-py project is already synchronized.

* jenkins checks depend on https://github.com/docker/docker-py/pull/888

Fixes issue #18626

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 5cc672b0061f3df41073cb7b4ff962998a13a09c
Component: engine
2016-01-15 10:03:29 +08:00
25aab1428e Merge pull request #18587 from calavera/daemon_configuration_file
Allow to set daemon and server configurations in a file.
Upstream-commit: e44364eae90784b423eee8b2969bda9cd2429746
Component: engine
2016-01-14 16:44:58 -08:00
1a8f320266 Allow to set daemon and server configurations in a file.
Read configuration after flags making this the priority:

1- Apply configuration from file.
2- Apply configuration from flags.

Reload configuration when a signal is received, USR2 in Linux:

- Reload router if the debug configuration changes.
- Reload daemon labels.
- Reload cluster discovery.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 677a6b3506107468ed8c00331991afd9176fa0b9
Component: engine
2016-01-14 16:44:37 -05:00
f8714c52f0 Add IPAM Config Options to match libnetwork
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
Upstream-commit: 662cac08ef83ee105addb4d29f6e46188468306f
Component: engine
2016-01-14 14:32:25 -05:00
8bab3a37a3 Merge pull request #19312 from cpuguy83/19177_fix_debug_req_dump_size
Don't dump request body when too large
Upstream-commit: 59231ea6d8bdff3d32140d7ab28aeb98fb93ebff
Component: engine
2016-01-14 09:06:02 -05:00
2b7ea75ef2 Forced endpoint cleanup
docker's network disconnect api now supports `Force` option which can be
used to force cleanup an endpoint from any host in the cluster.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: b464f1d78cdfa2a4124e083b8f7b0f2353f12de3
Component: engine
2016-01-13 21:28:52 -08:00
b056e82903 Don't dump request body to log when too large
Fixes an issue where a client can send a large body but specifiy
application/json as the content-type, and cause Docker to consume lots
of RAM while trying to buffer the body so it can be dumped to the debug
log.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 89af3835d483fe758f301aa8f3b1062a0ab712fb
Component: engine
2016-01-13 17:01:35 -05:00
3bf5cbf342 Merge pull request #19279 from tiborvass/rename-authz-to-authorization
Rename authz to authorization for greater clarity
Upstream-commit: 612cf0f172948c892d642af3213a012fcf292135
Component: engine
2016-01-13 14:30:18 -05:00
460be1e8dd Rename authz to authorization for greater clarity
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5c630ea7c3d5e7a24e1c4b2e15506f326706e9bc
Component: engine
2016-01-13 14:15:37 -05:00
9c6798de6b Add network interal mode
Signed-off-by: Chun Chen <ramichen@tencent.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: b70954e60a15d09756bd6b00a6fadedc64829477
Component: engine
2016-01-13 11:30:36 -05:00
41680fdf37 Merge pull request #19104 from vdemeester/18957-update-config
Add a specific config struct for the update command (#18957)
Upstream-commit: 1393c450cd8b4b7143a069ac062fd2adc6e02ca0
Component: engine
2016-01-12 09:46:19 -08:00
62a5091381 Add a specific config for the update command
This allows to define clearly what is mutable or not in a container
and remove the use of the internal HostConfig struct to be used.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a4f6920731c6af27a7e89c3da8d0e6fd309de90a
Component: engine
2016-01-12 08:33:41 +01:00
d8dc8b7d33 Docker changes for libnetwork vendoring..
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: 64a6dc355815261ac438b12a262e3cda7c9181df
Component: engine
2016-01-08 14:13:55 -08:00
7467c1af44 Allow user to choose the IP address for the container
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 2bb3fc1bc522059e9be5bd967b6a5c49917f5d0c
Component: engine
2016-01-08 10:09:16 -08:00
4ec2693c9e Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 907407d0b2e5863f0e1b40b93a356bbf03c7b9fb
Component: engine
2016-01-06 19:48:59 -05:00
db1910a30c Move responsibility of ls/inspect to volume driver
Makes `docker volume ls` and `docker volume inspect` ask the volume
drivers rather than only using what is cached locally.

Previously in order to use a volume from an external driver, one would
either have to use `docker volume create` or have a container that is
already using that volume for it to be visible to the other volume
API's.

For keeping uniqueness of volume names in the daemon, names are bound to
a driver on a first come first serve basis. If two drivers have a volume
with the same name, the first one is chosen, and a warning is logged
about the second one.

Adds 2 new methods to the plugin API, `List` and `Get`.
If a plugin does not implement these endpoints, a user will not be able
to find the specified volumes as well requests go through the drivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d3eca4451d264aac564594fe46b8c097bd85a5cc
Component: engine
2016-01-05 16:28:38 -05:00
f688b73835 Use ImageBuildOptions in builder.
dockerfile.Config is almost redundant with ImageBuildOptions.
Unify the two so that the latter can be removed. This also
helps build's API endpoint code to be less dependent on package
dockerfile.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 5190794f1d85d5406611eb69c270df62ac1cdc7f
Component: engine
2016-01-05 10:09:34 -08:00
58e545b6bf Merge pull request #18888 from calavera/event_types
Event all the things!
Upstream-commit: 723be0a3325799fd6b2a6b689af54f5a07edf992
Component: engine
2016-01-04 13:07:33 -08:00
5b8857958e Remove version package from API types.
It's an internal type that only extends string.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9961816adead89622f5d4201a0b5cb33845fa852
Component: engine
2016-01-04 12:51:45 -05:00
1162375d21 Merge pull request #15666 from vdemeester/3519-configurable-escape
Implement configurable escape key for attach/exec
Upstream-commit: db738dd77f699e93f976441d5fc11ab48a2d6c68
Component: engine
2016-01-04 00:49:07 +01:00
5582f5eb83 Implement configurable detach key
Implement configurable detach keys (for `attach`, exec`, `run` and
`start`) using the client-side configuration

- Adds a `--detach-keys` flag to `attach`, `exec`, `run` and `start`
  commands.
- Adds a new configuration field (in `~/.docker/config.json`) to
  configure the default escape keys for docker client.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 15aa2a663b47b6126a66efefcadb64edfbffb9f5
Component: engine
2016-01-03 23:03:39 +01:00
e32ea4c0f9 Add network events.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: f15af1eff75f920c956e7c437d1ef81f5c31129a
Component: engine
2015-12-30 17:39:33 -05:00
3580481051 Add event types.
- Stop serializing JSONMessage in favor of events.Message.
- Keep backwards compatibility with JSONMessage for container events.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 72f1881df102fce9ad31e98045b91c204dd44513
Component: engine
2015-12-30 17:39:33 -05:00
51b37769f0 Remove usage of pkg sockets and tlsconfig.
- Use the ones provided by docker/go-connections, they are a drop in replacement.
- Remove pkg/sockets from docker.
- Keep pkg/tlsconfig because libnetwork still needs it and there is a
  circular dependency issue.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 8e034802b7ad92a29f08785e553415adcd1348a3
Component: engine
2015-12-29 19:27:12 -05:00
7a41bd8435 Fix error messages
`docker kill 123` will show something like:
`Error response from daemon: Cannot kill container 123: nosuchcontainer: No such container: 123`
Notice the `nosuchcontainer` text, that should not be there as that's an internal ID that means nothing to the end user.
This PR fixes this by using `util.GetErrorMessage()` to extract just the message.

While in that dir I found a couple of other spots that could use the same call, just to be safe.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: b3e1178ad0e2cee43e9958f0f3b6e720bddc4ea4
Component: engine
2015-12-29 06:08:52 -08:00
3849375325 Merge pull request #18715 from calavera/remove_is_paused_from_interface
Remove `IsPaused` from backend interface.
Upstream-commit: baee7ae045019d33e6833043bbf86bd76e1b9d41
Component: engine
2015-12-28 11:25:11 -08:00
c4af30652d Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8799c4fc0feadede6ae60e77bd7d9dfd7cc72a79
Component: engine
2015-12-28 19:19:26 +08:00
1cfbdcfe91 Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 83237aab2b9430a88790467867505cc9a5147f3e
Component: engine
2015-12-23 13:27:58 -05:00
6f10e6b229 Add filter for network ls to hide predefined net
Add filter support for `network ls` to hide predefined network,
then user can use "docker network rm `docker network ls -f type=custom`"
to delete a bundle of userdefined networks.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 26dd026bd70c9c18a16b0e339821c309e56d8ff0
Component: engine
2015-12-23 13:26:40 +08:00
027f002cb3 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7ac4232e70fe7cf7318333cd0890db7f95663079
Component: engine
2015-12-22 13:34:30 -05:00
f1f019f89d Move ExecConfig to types.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 839f73c3028629ac1dde6617d6466b98f2bde416
Component: engine
2015-12-22 13:31:46 -05:00
9e1ab087f5 Remove IsPaused from backend interface.
Move connection hijacking logic to the daemon.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: af94f941df9ee43b61e0e8f9d3c3b3962597eff6
Component: engine
2015-12-21 12:34:21 -05:00
1c5df6581b Change the quiet flag behavior in the build command
Right now, the quiet (-q, --quiet) flag ignores the output
generated from within the container.

However, it ought to be quiet in a way that all kind
of diagnostic output should be ignored, unless the build
process fails.

This patch makes the quiet flag behave in the following way:
 1. If the build process succeeds, stdout contains the image ID
    and stderr is empty.
 2. If the build process fails, stdout is empty and stderr
    has the error message and the diagnostic output of that process.

If the quiet flag is not set, then everything goes to stdout
and error messages, if there are any, go to stderr.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 60b4db7eb17f4eb509be4a4968364ada2075d60c
Component: engine
2015-12-21 16:38:50 +02:00