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:
Miek Gieben
2026-03-24 16:18:53 +10:00
committed by GitHub
co-authored by Pasha Sviderski
parent 2ab58d24d4
commit 98439b7743
8 changed files with 29 additions and 0 deletions
+3
View File
@@ -11,6 +11,7 @@ import (
mapset "github.com/deckarep/golang-set/v2"
"github.com/distribution/reference"
"github.com/docker/docker/api/types/container"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/psviderski/uncloud/internal/machine/api/pb"
@@ -256,6 +257,8 @@ type ContainerSpec struct {
Init *bool
// LogDriver overrides the default logging driver for the container. Each Docker daemon can have its own default.
LogDriver *LogDriver
// Pid allows setting the PID name space, currently only "" or "host" is supported.
Pid container.PidMode
// Privileged gives extended privileges to the container. This is a security risk and should be used with caution.
Privileged bool
// PullPolicy determines when to pull the image from the registry or use the image already available in the cluster.