Add handling for new named volumes code in pkg/spec

Now that named volumes must be explicitly enumerated rather than
passed in with all other volumes, we need to split normal and
named volumes up before passing them into libpod. This PR does
this.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2019-03-26 15:29:20 -04:00
parent ee770ad5b5
commit 7309e38ddd
3 changed files with 49 additions and 17 deletions

View File

@ -545,14 +545,6 @@ func (r *Runtime) GetLatestContainer() (*Container, error) {
return ctrs[lastCreatedIndex], nil
}
// Check if volName is a named volume and not one of the default mounts we add to containers
func isNamedVolume(volName string) bool {
if volName != "proc" && volName != "tmpfs" && volName != "devpts" && volName != "shm" && volName != "mqueue" && volName != "sysfs" && volName != "cgroup" {
return true
}
return false
}
// Export is the libpod portion of exporting a container to a tar file
func (r *Runtime) Export(name string, path string) error {
ctr, err := r.LookupContainer(name)