From 2468235472eb0a849dcad7a7838488cc9df6f8dc Mon Sep 17 00:00:00 2001 From: Lachlan Pease Date: Sun, 6 Sep 2015 11:55:36 +1000 Subject: [PATCH 1/3] Added support for IPC namespaces, fixes GH-1689 Signed-off-by: Lachlan Pease --- compose/config/config.py | 1 + compose/service.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compose/config/config.py b/compose/config/config.py index 8df45b8a9f..c23a541eea 100644 --- a/compose/config/config.py +++ b/compose/config/config.py @@ -36,6 +36,7 @@ DOCKER_CONFIG_KEYS = [ 'extra_hosts', 'hostname', 'image', + 'ipc', 'labels', 'links', 'mac_address', diff --git a/compose/service.py b/compose/service.py index b48f2e14bd..bf65888c78 100644 --- a/compose/service.py +++ b/compose/service.py @@ -44,6 +44,7 @@ DOCKER_START_KEYS = [ 'dns_search', 'env_file', 'extra_hosts', + 'ipc', 'read_only', 'net', 'log_driver', @@ -696,7 +697,8 @@ class Service(object): extra_hosts=extra_hosts, read_only=read_only, pid_mode=pid, - security_opt=security_opt + security_opt=security_opt, + ipc_mode=options.get('ipc') ) def build(self, no_cache=False): From 67957318ed5080fe2babc3b704583f9c38bd5ea8 Mon Sep 17 00:00:00 2001 From: Lachlan Pease Date: Sun, 6 Sep 2015 12:16:12 +1000 Subject: [PATCH 2/3] Added IPC spec to fields_schema.json Signed-off-by: Lachlan Pease --- compose/config/fields_schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/config/fields_schema.json b/compose/config/fields_schema.json index 2a122b7a31..d25b3fa236 100644 --- a/compose/config/fields_schema.json +++ b/compose/config/fields_schema.json @@ -59,6 +59,7 @@ "external_links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "hostname": {"type": "string"}, "image": {"type": "string"}, + "ipc": {"type": "string"}, "labels": {"$ref": "#/definitions/list_or_dict"}, "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, From 851129de6c38be79c3c065104a2a369d74a8dc2b Mon Sep 17 00:00:00 2001 From: Lachlan Pease Date: Thu, 10 Sep 2015 23:34:07 +1000 Subject: [PATCH 3/3] Added documentation for IPC config Signed-off-by: Lachlan Pease --- docs/yml.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/yml.md b/docs/yml.md index 3ece026494..0524940f1f 100644 --- a/docs/yml.md +++ b/docs/yml.md @@ -373,7 +373,7 @@ Override the default labeling scheme for each container. - label:user:USER - label:role:ROLE -### working\_dir, entrypoint, user, hostname, domainname, mac\_address, mem\_limit, memswap\_limit, privileged, restart, stdin\_open, tty, cpu\_shares, cpuset, read\_only, volume\_driver +### working\_dir, entrypoint, user, hostname, domainname, mac\_address, mem\_limit, memswap\_limit, privileged, ipc, restart, stdin\_open, tty, cpu\_shares, cpuset, read\_only, volume\_driver Each of these is a single value, analogous to its [docker run](https://docs.docker.com/reference/run/) counterpart. @@ -394,6 +394,8 @@ Each of these is a single value, analogous to its memswap_limit: 2000000000 privileged: true + ipc: host + restart: always stdin_open: true