| 1 | # <a name="ZOSContainerConfiguration" />z/OS Container Configuration |
| 2 | |
| 3 | This document describes the schema for the [z/OS-specific section](config.md#platform-specific-configuration) of the [container configuration](config.md). |
| 4 | The z/OS container specification uses z/OS UNIX kernel features like namespaces and filesystem jails to fulfill the spec. |
| 5 | |
| 6 | Applications expecting a z/OS environment will very likely expect these file paths to be set up correctly. |
| 7 | |
| 8 | The following filesystems SHOULD be made available in each container's filesystem: |
| 9 | |
| 10 | | Path | Type | |
| 11 | | -------- | ------ | |
| 12 | | /proc | [proc][] | |
| 13 | |
| 14 | ## <a name="configZOSNamespaces" />Namespaces |
| 15 | |
| 16 | A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource. |
| 17 | Changes to the global resource are visible to other processes that are members of the namespace, but are invisible to other processes. |
| 18 | For more information, see https://www.ibm.com/docs/zos/latest?topic=planning-namespaces-zos-unix. |
| 19 | |
| 20 | Namespaces are specified as an array of entries inside the `namespaces` root field. |
| 21 | The following parameters can be specified to set up namespaces: |
| 22 | |
| 23 | * **`type`** *(string, REQUIRED)* - namespace type. The following namespace types SHOULD be supported: |
| 24 | * **`pid`** processes inside the container will only be able to see other processes inside the same container or inside the same pid namespace. |
| 25 | * **`mount`** the container will have an isolated mount table. |
| 26 | * **`ipc`** processes inside the container will only be able to communicate to other processes inside the same container via system level IPC. |
| 27 | * **`uts`** the container will be able to have its own hostname and domain name. |
| 28 | * **`path`** *(string, OPTIONAL)* - namespace file. |
| 29 | This value MUST be an absolute path in the [runtime mount namespace](glossary.md#runtime-namespace). |
| 30 | The runtime MUST place the container process in the namespace associated with that `path`. |
| 31 | The runtime MUST [generate an error](runtime.md#errors) if `path` is not associated with a namespace of type `type`. |
| 32 | |
| 33 | If `path` is not specified, the runtime MUST create a new [container namespace](glossary.md#container-namespace) of type `type`. |
| 34 | |
| 35 | If a namespace type is not specified in the `namespaces` array, the container MUST inherit the [runtime namespace](glossary.md#runtime-namespace) of that type. |
| 36 | If a `namespaces` field contains duplicated namespaces with same `type`, the runtime MUST [generate an error](runtime.md#errors). |
| 37 | |
| 38 | ### Example |
| 39 | |
| 40 | ```json |
| 41 | "namespaces": [ |
| 42 | { |
| 43 | "type": "pid", |
| 44 | "path": "/proc/1234/ns/pid" |
| 45 | }, |
| 46 | { |
| 47 | "type": "mount" |
| 48 | }, |
| 49 | { |
| 50 | "type": "ipc" |
| 51 | }, |
| 52 | { |
| 53 | "type": "uts" |
| 54 | } |
| 55 | ] |
| 56 | ``` |