aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2018-04-12 10:46:47 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-12 15:24:46 +0000
commit6f51a5b2f9c88064cab0463dec6050007aebebdf (patch)
tree2ed44b86b0e1d22c651594a553c3a283200d3cae
parent49f93972172dc5ab807abab6c97718380a0580ee (diff)
downloadpodman-6f51a5b2f9c88064cab0463dec6050007aebebdf.tar.gz
podman-6f51a5b2f9c88064cab0463dec6050007aebebdf.tar.bz2
podman-6f51a5b2f9c88064cab0463dec6050007aebebdf.zip
Force host UID/GID mapping when creating containers
Until we can handle running containers which use UID/GID mappings, make sure that we always create containers that use the host mappings. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> Closes: #609 Approved by: baude
-rw-r--r--libpod/storage.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/libpod/storage.go b/libpod/storage.go
index d135285f6..967e9889d 100644
--- a/libpod/storage.go
+++ b/libpod/storage.go
@@ -102,7 +102,13 @@ func (r *storageService) CreateContainerStorage(systemContext *types.SystemConte
// Build the container.
names := []string{containerName}
- container, err := r.store.CreateContainer(containerID, names, img.ID, "", string(mdata), nil)
+ options := storage.ContainerOptions{
+ IDMappingOptions: storage.IDMappingOptions{
+ HostUIDMapping: true,
+ HostGIDMapping: true,
+ },
+ }
+ container, err := r.store.CreateContainer(containerID, names, img.ID, "", string(mdata), &options)
if err != nil {
logrus.Debugf("failed to create container %s(%s): %v", metadata.ContainerName, containerID, err)