mirror of
https://github.com/containers/podman
synced 2024-10-20 01:03:51 +00:00
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
This commit is contained in:
parent
49f9397217
commit
6f51a5b2f9
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue