Commit graph

68 commits

Author SHA1 Message Date
John Starks
194eaa5c0f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-04 13:14:57 -07:00
Tonis Tiigi
14dc4a7158 Expose RootFS in image inspect
Fixes #20451

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-22 13:49:30 -07:00
John Howard
4461bc45b6 Windows: Fix unmount for Hyper-V Containers
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-18 20:43:46 -07:00
John Howard
94d70d8355 Windows libcontainerd implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Darren Stahl <darst@microsoft.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-18 13:38:41 -07:00
msabansal
e8026d8a98 Windows libnetwork integration
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-03-09 20:33:21 -08:00
Qiang Huang
ca89c329b9 Add CgroupDriver to docker info
Fixes: #19539

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-03-02 20:07:06 +08:00
Qiang Huang
8ae6f6ac28 Support update swap memory only
We should support update swap memory without memory.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-02-24 13:36:47 +08:00
Alessandro Boch
ed364b69df Invoke ReloadConfiguration on network controller
- It reverts fa163f5619 plus a small change
  in order to allow passing the global scope datastore
  to libnetwork after damon boot.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-18 12:14:14 -08:00
Antonio Murdaca
140a74347d daemon_unix: set golang runtime max threads
SetMaxThreads from runtime/debug in Golang is called to set max threads
value to 90% of /proc/sys/kernel/threads-max

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-30 21:37:24 +01:00
Vincent Demeester
141a301dca Merge pull request #19154 from hqhq/hq_verify_cgroupparent
Verify cgroup-parent name for systemd cgroup
2016-01-26 11:44:31 +01:00
David Calavera
c539be8833 Allow network configuration via daemon config file.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-25 18:54:56 -05:00
Qiang Huang
5ce5a8e966 Verify cgroup-parent name for systemd cgroup
Fixes: #17126

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-01-22 21:17:23 -05:00
Phil Estes
557c7cb888 Move userns support out of experimental into master
Adds the `--userns-remap` flag to the master build

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-01-08 15:06:22 -05:00
David Calavera
907407d0b2 Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-06 19:48:59 -05:00
Daniel Nephin
f5916b10ae Remove the graph driver from the daemon, move it into the layer store.
Support restoreCustomImage for windows with a new interface to extract
the graph driver from the LayerStore.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-28 12:55:48 -05:00
Sebastiaan van Stijn
1105caa7f1 Merge pull request #18860 from dnephin/remove_migrate_if_downlevel
Remove migrateIfDownlevel and aufs migration from docker pre-0.7
2015-12-23 00:08:36 +01:00
Daniel Nephin
0673361ef6 Remove migrateIfDownlevel and aufs migration from docker pre-0.7
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-22 16:45:42 -05:00
David Calavera
7ac4232e70 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>
2015-12-22 13:34:30 -05:00
Ma Shimiao
843084b08b Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-21 09:14:49 +08:00
Tonis Tiigi
2655954c2d Add own reference package wrapper
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
Ma Shimiao
3f15a055e5 Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-04 09:26:03 +08:00
David Calavera
6bb0d1816a Move Container to its own package.
So other packages don't need to import the daemon package when they
want to use this struct.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-03 17:39:49 +01:00
Qiang Huang
4089b4e440 Set default MemorySwappiness when adapt
It makes the inspect result consistent between cli and REST api
when MemorySwappiness is not set.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-02 10:53:52 +08:00
Tonis Tiigi
20e759ab56 Validate adding digests to tagstore with go types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-25 15:06:51 -08:00
Tonis Tiigi
4352da7803 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-24 09:40:25 -08:00
David Calavera
060f4ae617 Remove the container initializers per platform.
By removing deprecated volume structures, now that windows mount volumes we don't need a initializer per platform.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-18 08:41:46 -05:00
John Howard
b2771b4456 Windows: Disable links
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-15 21:32:31 -08:00
John Howard
2648655a4a Remove uncalled configureSysInit
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-13 13:43:09 -08:00
Vincent Demeester
588fedef4a Merge pull request #17949 from Microsoft/jjh/cpuweighttp4
Windows: TP4 fix cpu weight
2015-11-12 21:13:09 +01:00
Vincent Demeester
812a1c149a Merge pull request #13959 from Mashimiao/add-support-blkio_weight_device
Add support for blkio.weight_device
2015-11-12 20:42:13 +01:00
John Howard
90eac6b48b Windows: TP4 fix cpu weight
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-12 11:08:24 -08:00
John Howard
122568b314 Windows [TP4] Require build 10586+
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-11 14:49:14 -08:00
Ma Shimiao
0fbfa1449d Add support for blkio.weight_device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-11-11 23:06:36 +08:00
Alexander Morozov
28588efb47 Merge pull request #17089 from Microsoft/10662-ansi
Windows: Native ANSI console support
2015-11-09 08:05:08 -08:00
David Calavera
3a49765046 Decouple daemon and container to mount and unmount filesystems.
Side effects:
- Decouple daemon and container to start containers.
- Decouple daemon and container to copy files.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-04 12:27:47 -05:00
John Howard
805dd0eeed Windows: Native ANSI console support
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-30 13:44:04 -07:00
Alexander Morozov
6d9bb99c97 Return pointer from newBaseContainer
It makes code more consistent.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-27 09:05:28 -07:00
Phil Estes
442b45628e Add user namespace (mapping) support to the Docker engine
Adds support for the daemon to handle user namespace maps as a
per-daemon setting.

Support for handling uid/gid mapping is added to the builder,
archive/unarchive packages and functions, all graphdrivers (except
Windows), and the test suite is updated to handle user namespace daemon
rootgraph changes.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-10-09 17:47:37 -04:00
Madhu Venugopal
139ea5b7f2 Docker daemon updates to libnetwork discovery support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-02 20:57:47 -07:00
Antonio Murdaca
c300978370 Merge pull request #16562 from Microsoft/10662-fixhttppull
Windows: Fix ADD from URL in dockerfile
2015-09-30 11:46:57 +02:00
Tibor Vass
b08f071e18 Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de41640435, reversing
changes made to 7daeecd42d.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
2015-09-29 14:26:51 -04:00
John Howard
608b3db5c8 Windows: Fix ADD from URL in dockerfile
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-24 13:20:15 -07:00
Doug Davis
26b1064967 Add context.RequestID to event stream
This PR adds a "request ID" to each event generated, the 'docker events'
stream now looks like this:

```
2015-09-10T15:02:50.000000000-07:00 [reqid: c01e3534ddca] de7c5d4ca927253cf4e978ee9c4545161e406e9b5a14617efb52c658b249174a: (from ubuntu) create
```
Note the `[reqID: c01e3534ddca]` part, that's new.

Each HTTP request will generate its own unique ID. So, if you do a
`docker build` you'll see a series of events all with the same reqID.
This allow for log processing tools to determine which events are all related
to the same http request.

I didn't propigate the context to all possible funcs in the daemon,
I decided to just do the ones that needed it in order to get the reqID
into the events. I'd like to have people review this direction first, and
if we're ok with it then I'll make sure we're consistent about when
we pass around the context - IOW, make sure that all funcs at the same level
have a context passed in even if they don't call the log funcs - this will
ensure we're consistent w/o passing it around for all calls unnecessarily.

ping @icecrime @calavera @crosbymichael

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-24 11:56:37 -07:00
Jess Frazelle
23750fb802 Merge pull request #15862 from calavera/share_shm_and_mqueue
Share shm and mqueue between containers.
2015-09-24 11:23:59 -07:00
John Howard
a5879bb83b Windows: [TP4] Add CPU Weight
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-22 18:29:15 -07:00
John Howard
42a46ed1a4 Windows: Enabled docker volume
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-16 14:33:13 -07:00
Mrunal Patel
c8291f7107 Add support for sharing /dev/shm/ and /dev/mqueue between containers
This changeset creates /dev/shm and /dev/mqueue mounts for each container under
/var/lib/containers/<id>/ and bind mounts them into the container. When --ipc:container<id/name>
is used, then the /dev/shm and /dev/mqueue of the ipc container are used instead of creating
new ones for the container.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)

(cherry picked from commit d88fe447df)
2015-09-11 14:02:11 -04:00
Morgan Bauer
abd72d4008
golint fixes for daemon/ package
- some method names were changed to have a 'Locking' suffix, as the
 downcased versions already existed, and the existing functions simply
 had locks around the already downcased version.
 - deleting unused functions
 - package comment
 - magic numbers replaced by golang constants
 - comments all over

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-08-27 22:07:42 -07:00
Sebastiaan van Stijn
fa13f7cde8 Merge pull request #14242 from cpuguy83/add_volume_api
Add volume api
2015-08-26 21:57:12 +02:00
Brian Goff
b3b7eb2723 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-26 13:37:52 -04:00