소스 검색

Merge pull request #1995 from predakanga/master

Added support for IPC namespaces, fixes GH-1689
mnowster 10 년 전
부모
커밋
1c823597bb
4개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      compose/config/config.py
  2. 1 0
      compose/config/fields_schema.json
  3. 3 1
      compose/service.py
  4. 3 1
      docs/yml.md

+ 1 - 0
compose/config/config.py

@@ -36,6 +36,7 @@ DOCKER_CONFIG_KEYS = [
     'extra_hosts',
     'hostname',
     'image',
+    'ipc',
     'labels',
     'links',
     'log_driver',

+ 1 - 0
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},
 

+ 3 - 1
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):

+ 3 - 1
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