diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-06-03 21:08:07 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-15 14:53:18 +0000 |
commit | a1ec6747f187ff2dbc1256cb5c11c5775324f2e2 (patch) | |
tree | 7ad1aa70617a7edfcdea92290fac6fa8f59e6a03 /libpod/container_internal.go | |
parent | 5e699e28a7cadc959b3e306d4d53f415c5ff605f (diff) | |
download | podman-a1ec6747f187ff2dbc1256cb5c11c5775324f2e2.tar.gz podman-a1ec6747f187ff2dbc1256cb5c11c5775324f2e2.tar.bz2 podman-a1ec6747f187ff2dbc1256cb5c11c5775324f2e2.zip |
container: do not set any mapping when using a rootfs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #871
Approved by: mheon
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index b6198f3c4..30dbf52e6 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -225,8 +225,12 @@ func (c *Container) setupStorage(ctx context.Context) error { return errors.Wrapf(ErrInvalidArg, "must provide image ID and image name to use an image") } - options := storage.ContainerOptions{IDMappingOptions: c.config.IDMappings} - containerInfo, err := c.runtime.storageService.CreateContainerStorage(ctx, c.runtime.imageContext, c.config.RootfsImageName, c.config.RootfsImageID, c.config.Name, c.config.ID, c.config.MountLabel, &options) + var options *storage.ContainerOptions + if c.config.Rootfs == "" { + options = &storage.ContainerOptions{c.config.IDMappings} + + } + containerInfo, err := c.runtime.storageService.CreateContainerStorage(ctx, c.runtime.imageContext, c.config.RootfsImageName, c.config.RootfsImageID, c.config.Name, c.config.ID, c.config.MountLabel, options) if err != nil { return errors.Wrapf(err, "error creating container storage") } |