From dac0df0019481e722ea98971899979c1354ed52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Nov 2022 10:56:50 +0100 Subject: [PATCH] chore: bring ShmSize back to the first layer --- container.go | 2 +- docker.go | 1 + lifecycle.go | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/container.go b/container.go index 7fb977acfb..21c040b8eb 100644 --- a/container.go +++ b/container.go @@ -121,7 +121,7 @@ type ContainerRequest struct { AlwaysPullImage bool // Always pull image ImagePlatform string // ImagePlatform describes the platform which the image runs on. Binds []string // Deprecated: Use PreCreateModifier instead - ShmSize int64 // Deprecated: Use PreCreateModifier instead. Amount of memory shared with the host (in bytes) + ShmSize int64 // Amount of memory shared with the host (in bytes) CapAdd []string // Deprecated: Use PreCreateModifier instead. Add Linux capabilities CapDrop []string // Deprecated: Use PreCreateModifier instead. Drop Linux capabilities PreCreateModifier func(*container.HostConfig, map[string]*network.EndpointSettings) // Modifier for the host config and network settings before container creation diff --git a/docker.go b/docker.go index 86f14f6641..ef0de3d3ea 100644 --- a/docker.go +++ b/docker.go @@ -1049,6 +1049,7 @@ func (p *DockerProvider) CreateContainer(ctx context.Context, req ContainerReque hostConfig := &container.HostConfig{ Privileged: req.Privileged, + ShmSize: req.ShmSize, Tmpfs: req.Tmpfs, } diff --git a/lifecycle.go b/lifecycle.go index eec99d3365..0588c4b98c 100644 --- a/lifecycle.go +++ b/lifecycle.go @@ -72,6 +72,5 @@ func defaultPreCreateModifier(req ContainerRequest) func(hostConfig *container.H hostConfig.ExtraHosts = req.ExtraHosts hostConfig.NetworkMode = req.NetworkMode hostConfig.Resources = req.Resources - hostConfig.ShmSize = req.ShmSize } }