mutates container caller must have handled cloning or creating a new child.
(ctx context.Context, target string)
| 5965 | |
| 5966 | // mutates container caller must have handled cloning or creating a new child. |
| 5967 | func (container *Container) WithoutUnixSocket(ctx context.Context, target string) (*Container, error) { |
| 5968 | target = absPath(container.Config.WorkingDir, target) |
| 5969 | |
| 5970 | for i, sock := range container.Sockets { |
| 5971 | if sock.ContainerPath == target { |
| 5972 | container.Sockets = slices.Delete(container.Sockets, i, i+1) |
| 5973 | break |
| 5974 | } |
| 5975 | } |
| 5976 | |
| 5977 | // set image ref to empty string |
| 5978 | container.ImageRef = "" |
| 5979 | |
| 5980 | return container, nil |
| 5981 | } |
| 5982 | |
| 5983 | // mutates container caller must have handled cloning or creating a new child. |
| 5984 | func (container *Container) WithSecretVariable( |