Collect user-supplied bind mounts as string-format binds. Bind mounts use the legacy `Binds` field (`-v` syntax) rather than the structured `Mount` API because the Docker Engine Mount object does not support `SELinux` relabelling (`:z` / `:Z`). The string format does.
(config: &DockerSandboxDriverConfig)
| 1771 | /// structured `Mount` API because the Docker Engine Mount object does not |
| 1772 | /// support `SELinux` relabelling (`:z` / `:Z`). The string format does. |
| 1773 | fn docker_driver_bind_strings(config: &DockerSandboxDriverConfig) -> Result<Vec<String>, Status> { |
| 1774 | config |
| 1775 | .mounts |
| 1776 | .iter() |
| 1777 | .filter_map(|m| match m { |
| 1778 | DockerDriverMountConfig::Bind { |
| 1779 | source, |
| 1780 | target, |
| 1781 | read_only, |
| 1782 | selinux_label, |
| 1783 | } => Some(docker_bind_string( |
| 1784 | source, |
| 1785 | target, |
| 1786 | *read_only, |
| 1787 | *selinux_label, |
| 1788 | )), |
| 1789 | _ => None, |
| 1790 | }) |
| 1791 | .collect() |
| 1792 | } |
| 1793 | |
| 1794 | fn docker_bind_string( |
| 1795 | source: &str, |
no test coverage detected