Due to current deficiencies in the Windows implementation of
containerd's Mount.Mount, we need different behaviour for mounting on
Windows and Unix platforms.
Specifically:
* Windows mounts can only mount in-place, and hence only one mount
should be in the list.
* BuildKit doesn't own the mount directory, so should not try and remove
it on unmount.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
Refactor the interface to avoid such issues in the future.
BuildKit own mounts are stateless and not affected but
a different mountable implementation could get confused.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>