Skip to content

Commit

Permalink
chore: bring ShmSize back to the first layer
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Nov 29, 2022
1 parent b437b88 commit dac0df0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
1 change: 0 additions & 1 deletion lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit dac0df0

Please sign in to comment.