(conn context.Context, ID string)
| 63 | } |
| 64 | |
| 65 | func waitAndRemoveContainer(conn context.Context, ID string) error { |
| 66 | _, err := containers.Wait(conn, ID, new(containers.WaitOptions).WithCondition([]define.ContainerStatus{stopped})) |
| 67 | if err != nil { |
| 68 | return err |
| 69 | } |
| 70 | |
| 71 | _, err = containers.Remove(conn, ID, new(containers.RemoveOptions).WithForce(true)) |
| 72 | if err != nil { |
| 73 | // There's a podman bug somewhere that's causing this |
| 74 | if err.Error() == "unexpected end of JSON input" { |
| 75 | return nil |
| 76 | } |
| 77 | return err |
| 78 | } |
| 79 | |
| 80 | return nil |
| 81 | } |
| 82 | |
| 83 | func convertMounts(mounts []mount) []specs.Mount { |
| 84 | result := []specs.Mount{} |
no outgoing calls
no test coverage detected