diff --git a/compose/config/config.py b/compose/config/config.py index b7d13f8ad..840a28a1b 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', 'log_driver', diff --git a/compose/config/fields_schema.json b/compose/config/fields_schema.json index e79026265..6fce299cb 100644 --- a/compose/config/fields_schema.json +++ b/compose/config/fields_schema.json @@ -71,6 +71,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}, diff --git a/compose/service.py b/compose/service.py index 7e035e29f..efd6c4bc7 100644 --- a/compose/service.py +++ b/compose/service.py @@ -45,6 +45,7 @@ DOCKER_START_KEYS = [ 'dns_search', 'env_file', 'extra_hosts', + 'ipc', 'read_only', 'net', 'log_driver', @@ -697,7 +698,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): diff --git a/docs/yml.md b/docs/yml.md index 3337f915e..2f1ae1a6a 100644 --- a/docs/yml.md +++ b/docs/yml.md @@ -382,7 +382,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. @@ -403,6 +403,8 @@ Each of these is a single value, analogous to its memswap_limit: 2000000000 privileged: true + ipc: host + restart: always stdin_open: true