Commit graph

369 commits

Author SHA1 Message Date
Stephen Rust
d394113dfe Check for nil before using HostConfig to adjustCpuShares
Fix #14915. Add unit test for #14915.
Thanks @runcom for the test case: when the client calls 1.18 api
version w/o hostconfig it results in a nil pointer dereference.

Signed-off-by: Stephen Rust <srust@blockbridge.com>
(cherry picked from commit c358a4cd35)
2015-07-30 17:21:20 -07:00
David Calavera
689c4e6075 Keep backwards compatibility in kill api.
Return an error when the container is stopped only in api versions
equal or greater than 1.20 (docker 1.8).

Signed-off-by: David Calavera <david.calavera@gmail.com>
(cherry picked from commit 621e3d8587)
2015-07-29 16:44:21 -07:00
Lei
877dbbbde8 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-07-23 10:26:06 +08:00
Alexander Morozov
3ee7297b7e Merge pull request #14869 from calavera/remove_duplicated_cp_handlers_init
Remove duplicated code parsing parameters for the archiving handlers.
2015-07-22 13:25:34 -07:00
David Calavera
1612ff9726 Remove duplicated code parsing parameters for the archiving handlers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-22 12:39:46 -07:00
David Calavera
1c6fe58efc Merge pull request #14442 from cpuguy83/refactor_logdrvier_reader
Refactor log driver reader
2015-07-22 11:54:35 -07:00
Alexander Morozov
a751c0a52f Merge pull request #14790 from hqhq/hq_golint_build
Fix golint warnings for builder
2015-07-22 08:17:04 -07:00
Antonio Murdaca
1a5d6a94c9 Fix wrong Content-Type returned by /images/search API
/images/search was replying with Content-Type text/plain instead
of application/json.
Fix #14846

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-22 11:07:41 +02:00
Sebastiaan van Stijn
50d2597e49 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
2015-07-22 09:02:00 +02:00
Qiang Huang
8c4a282a57 Fix golint warnings for builder
Addresses: #14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-22 13:29:03 +08:00
Brian Goff
c0391bf554 Split reader interface from logger interface
Implement new reader interface on jsonfile.
Moves jsonlog decoding from daemon to jsonfile logger.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-21 20:47:31 -04:00
David Calavera
1c3cb2d31e Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-21 15:33:05 -07:00
Josh Hawn
db9cc91a9e api/server: StatPath, ArchivePath, ExtractToDir
Adds http handlers for new API endpoints:

GET ContainersArchivePath
  Return a Tar Archive of the contents at the specified location in a
  container. Deprecates POST ContainersCopy. Use a HEAD request to stat
  the resource.

PUT ContainersExtractToDir
  Extract the Tar Archive from the request body to the directory at the
  specified location inside a container.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-21 15:19:52 -07:00
Jessie Frazelle
2cd417df73 Merge pull request #14388 from runcom/14316-fix-events-filters
Fix combined image events filters
2015-07-07 18:08:56 -07:00
Antonio Murdaca
19e6de2654 Fix combined image events filters
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-04 00:19:08 +02:00
Ma Shimiao
801a7fed19 api/server: Add missing json check
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-07-03 08:52:32 +08:00
Brian Goff
d0a299c027 Send resp immediately on GET /events
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-02 11:45:24 -04:00
Antonio Murdaca
88d32a6109 Fix regression in containers attach/wsattach api, return not found before hijacking
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-01 18:16:17 +02:00
David Calavera
d543a01e17 Merge pull request #14061 from runcom/clean-builder-daemon-config
Add struct to configure Builder commit
2015-06-29 11:04:05 -07:00
John Howard
126529c6d0 Windows: Security warning based on server OS
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-26 10:33:45 -07:00
Josh Hawn
02c7bbefb8 [api, builder] Fix build auth config
With the 1.7 release, we introduced a change to how we store registry
credentials, but the build API endpoint did not expect a change in the format
of that file. This patch fixes this problem so that you can again pull private
images during `docker build`.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-06-23 12:58:17 -07:00
David Calavera
aa4f495cae Merge pull request #13966 from mountkin/fix-stats-goroutine-leak
fix the goroutine leak in the stats API if the container is not running
2015-06-23 10:06:35 -07:00
Shijiang Wei
1cbf5a54da fix the goroutine leak in the stats API if the container is not running
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-06-23 19:38:15 +08:00
John Howard
87eae0d659 Add branch and build time to version
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-22 13:00:27 -07:00
Arnaud Porterie
fef0e84b2d Merge pull request #14051 from mavenugo/services
experimental services ui
2015-06-20 18:24:37 -07:00
Antonio Murdaca
7046651b87 Add struct to configure Builder commit instead of using one defined in daemon
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-20 12:53:47 +02:00
Alexander Morozov
e5ded9c378 Merge pull request #13997 from runcom/drop-old-client
Error out if client API version is too old
2015-06-19 17:05:39 -07:00
Madhu Venugopal
742db1737c attaching services api and UI chain to docker parent
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-19 09:19:09 -07:00
Madhu Venugopal
da5a3e6dee register libnetwork API and UI with docker parent chain
This commit also brings in the ability to specify a default network and its
corresponding driver as daemon flags. This helps in existing clients to
make use of newer networking features provided by libnetwork.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-18 12:07:58 -07:00
Antonio Murdaca
910322a893 Error out if client API version is too old
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-18 11:03:07 +02:00
Antonio Murdaca
b6a6c56915 Remove missed code path for api < 1.12
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-17 17:00:48 +02:00
Tibor Vass
d820e00aac Update vendored go.net to use golang.org/x/net canonical path
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-06-16 11:40:04 -04:00
Arnaud Porterie
422fa7f0a6 Merge pull request #13749 from Microsoft/adduseragent
Add GOOS in User-Agent
2015-06-12 17:19:51 -07:00
John Howard
d2c5fcc8d5 Windows: Patch up compile after adjustCpuShares
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-12 13:00:59 -07:00
Brian Goff
855a056af7 Fixes content-type/length for stats stream=false
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-06-12 13:06:06 -04:00
Arnaud Porterie
71ead0ef5c Merge pull request #13722 from samuelkarp/CpuShareRemoteAPI
Adjust disallowed CpuShares in /containers/create
2015-06-11 14:20:50 -07:00
Brian Goff
74c12aa429 Default events since to current time
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-06-10 12:37:40 -04:00
Antonio Murdaca
4ce817796e Avoid nil pointer dereference while creating a container with an empty Config
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-06 20:07:32 +02:00
Arnaud Porterie
efe5c64768 Merge pull request #13636 from tiborvass/refactor-tls
Refactor TLS code with a new `tlsconfig` package
2015-06-05 10:16:24 -07:00
Tibor Vass
bfed4b7cc3 Refactor TLS code with a new tlsconfig package
This patch creates a new `tlsconfig` package to handle creation of
secure-enough TLS configurations for clients and servers.

The package was created by refactoring TLS code in the client and the
daemon. After this patch, it is expected that all code creating TLS
configurations use this `tlsconfig` package for greater security,
consistency and readability.

On the server side, this fixes a bug where --tlsverify was not taken
into account. Now, if specified, it will require the client to
authenticate.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-06-05 12:38:38 -04:00
Samuel Karp
ed39fbeb2a Adjust disallowed CpuShares in /containers/create
Previous versions of libcontainer allowed CpuShares that were greater
than the maximum or less than the minimum supported by the kernel, and
relied on the kernel to do the right thing. Newer libcontainer fails
after creating the container if the requested CpuShares is different
from what was actually created by the kernel, which breaks compatibility
with earlier Docker Remote API versions. This change explicitly adjusts
the requested CpuShares in API versions < 1.20.

Signed-off-by: Samuel Karp <skarp@amazon.com>
2015-06-04 17:19:39 -07:00
Brian Goff
0c84604f54 Fix goroutine leak on logs -f with no output
Also noticed potential hang when only stdout or stderr are used with
follow=1

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-06-04 13:56:40 -07:00
John Howard
543cf79ffb Add GOOS in User-Agent
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-04 13:37:41 -07:00
Jessica Frazelle
229b599259 fix version struct on old versions
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-06-03 16:56:50 -07:00
Alexander Morozov
9e7fc245a7 Support CloseNotifier for events
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-03 11:42:51 -07:00
Antonio Murdaca
6deaa58ba5 Expose old config field for api < 1.19
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-06-02 23:37:59 +02:00
Arnaud Porterie
2de2782fe8 Merge pull request #13666 from runcom/13665-kill-signal-wrong-handled
Fix wrong kill signal parsing
2015-06-02 09:40:55 -07:00
Antonio Murdaca
39eec4c25b Fix wrong kill signal parsing
Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
2015-06-02 18:01:19 +02:00
Arnaud Porterie
05b1d02423 Merge pull request #13609 from Microsoft/10662-refixserverwindows
Windows: Fix windows to match linux after compile break
2015-06-01 17:03:13 -07:00
Phil Estes
d37aad170f Merge pull request #13568 from jfrazelle/fix-release-script-for-experimental
fix release script for experimental
2015-06-01 12:29:45 -04:00