UpdateErrorLabel updates the "nerdctl/error" label of the container according to the container error.
(ctx context.Context, container containerd.Container, err error)
| 124 | // UpdateErrorLabel updates the "nerdctl/error" |
| 125 | // label of the container according to the container error. |
| 126 | func UpdateErrorLabel(ctx context.Context, container containerd.Container, err error) error { |
| 127 | opt := containerd.WithAdditionalContainerLabels(map[string]string{ |
| 128 | labels.Error: err.Error(), |
| 129 | }) |
| 130 | return container.Update(ctx, containerd.UpdateContainerOpts(opt)) |
| 131 | } |
| 132 | |
| 133 | // WithBindMountHostProcfs replaces procfs mount with rbind. |
| 134 | // Required for --pid=host on rootless. |
no test coverage detected
searching dependent graphs…