We need to sort mounts so that one mount does not over mount another.

Currently we add mounts from images, volumes and internal.
We can accidently over mount an existing mount.  This patch sorts the mounts
to make sure a parent directory is always mounted before its content.

Had to change the default propagation on image volume mounts from shared
to private to stop mount points from leaking out of the container.

Also switched from using some docker/docker/pkg to container/storage/pkg
to remove some dependencies on Docker.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1243
Approved by: mheon
This commit is contained in:
Daniel J Walsh
2018-08-10 14:46:59 -04:00
committed by Atomic Bot
parent 8b2d38ee84
commit 92e9d7891e
10 changed files with 37 additions and 247 deletions

View File

@ -8,8 +8,8 @@ import (
"strings"
"time"
"github.com/containers/storage/pkg/stringid"
"github.com/docker/docker/daemon/caps"
"github.com/docker/docker/pkg/stringid"
"github.com/pkg/errors"
"github.com/projectatomic/libpod/libpod/driver"
"github.com/projectatomic/libpod/pkg/inspect"