WithImageStopSignal sets a well-known containerd label (StopSignalLabel) on the container for storing the stop signal specified in the OCI image config
(image Image, defaultSignal string)
| 176 | // on the container for storing the stop signal specified in the OCI image |
| 177 | // config |
| 178 | func WithImageStopSignal(image Image, defaultSignal string) NewContainerOpts { |
| 179 | return func(ctx context.Context, _ *Client, c *containers.Container) error { |
| 180 | if c.Labels == nil { |
| 181 | c.Labels = make(map[string]string) |
| 182 | } |
| 183 | stopSignal, err := GetOCIStopSignal(ctx, image, defaultSignal) |
| 184 | if err != nil { |
| 185 | return err |
| 186 | } |
| 187 | c.Labels[StopSignalLabel] = stopSignal |
| 188 | return nil |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | // WithSnapshotter sets the provided snapshotter for use by the container |
| 193 | // |
nothing calls this directly
no test coverage detected
searching dependent graphs…