From 0f2b5999924826d5d0d546cb8b58e701fd9b854a Mon Sep 17 00:00:00 2001 From: Laura Brehm Date: Fri, 23 Dec 2022 18:12:35 +0000 Subject: [PATCH] Add support for `uts` attribute in service definition Signed-off-by: Laura Brehm --- loader/full-example.yml | 2 ++ loader/full-struct_test.go | 3 +++ schema/compose-spec.json | 1 + 3 files changed, 6 insertions(+) diff --git a/loader/full-example.yml b/loader/full-example.yml index 585c31b7..5c62e815 100644 --- a/loader/full-example.yml +++ b/loader/full-example.yml @@ -182,6 +182,8 @@ services: ipc: host + uts: host + # Mapping or list # Mapping values can be strings, numbers or null labels: diff --git a/loader/full-struct_test.go b/loader/full-struct_test.go index 263ef22f..d98c2560 100644 --- a/loader/full-struct_test.go +++ b/loader/full-struct_test.go @@ -200,6 +200,7 @@ func services(workingDir, homeDir string) []types.ServiceConfig { Hostname: "foo", Image: "redis", Ipc: "host", + Uts: "host", Labels: map[string]string{ "com.example.description": "Accounting webapp", "com.example.number": "42", @@ -877,6 +878,7 @@ services: hard: 40000 nproc: 65535 user: someone + uts: host volumes: - type: volume target: /var/lib/mysql @@ -1530,6 +1532,7 @@ func fullExampleJSON(workingDir, homeDir string) string { "nproc": 65535 }, "user": "someone", + "uts": "host", "volumes": [ { "type": "volume", diff --git a/schema/compose-spec.json b/schema/compose-spec.json index 7e693823..b7b90c3d 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -366,6 +366,7 @@ } }, "user": {"type": "string"}, + "uts": {"type": "string"}, "userns_mode": {"type": "string"}, "volumes": { "type": "array",