mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
feat: support PID namespace mode in Compose (#276)
This adds `pid: host` compose key support. Modelled after #238. See: #237 Signed-off-by: Miek Gieben <miek@miek.nl> Co-authored-by: Pasha Sviderski <me@psviderski.name>
This commit is contained in:
co-authored by
Pasha Sviderski
parent
2ab58d24d4
commit
98439b7743
@@ -53,6 +53,7 @@ func ServiceSpecFromCompose(project *types.Project, serviceName string) (api.Ser
|
||||
Healthcheck: healthcheckFromCompose(service.HealthCheck),
|
||||
Image: service.Image,
|
||||
Init: service.Init,
|
||||
Pid: container.PidMode(service.Pid),
|
||||
Privileged: service.Privileged,
|
||||
PullPolicy: pullPolicy,
|
||||
Resources: resourcesFromCompose(service),
|
||||
|
||||
@@ -127,6 +127,7 @@ func TestServiceSpecFromCompose(t *testing.T) {
|
||||
"max-file": "3",
|
||||
},
|
||||
},
|
||||
Pid: "host",
|
||||
Privileged: true,
|
||||
PullPolicy: api.PullPolicyAlways,
|
||||
Resources: api.ContainerResources{
|
||||
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
- ALL
|
||||
command: ["nginx", "updated", "command"]
|
||||
cpus: 0.5
|
||||
pid: host
|
||||
deploy:
|
||||
update_config:
|
||||
order: stop-first
|
||||
|
||||
Reference in New Issue
Block a user