mirror of
https://github.com/containers/podman.git
synced 2025-09-29 01:35:06 +08:00
rootless: fix create with images not in the storage
This chunk was mistakenly removed with ecec1a5430885baf96d2e3d6153c7454c41a4617 Introduce it back as it solves the pull of an image that is not yet in the storage when using create/run. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1521 Approved by: baude
This commit is contained in:

committed by
Atomic Bot

parent
37b2601a81
commit
c4b15ce46b
@ -61,6 +61,10 @@ func createCmd(c *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if os.Geteuid() != 0 {
|
||||
rootless.SetSkipStorageSetup(true)
|
||||
}
|
||||
|
||||
runtime, err := libpodruntime.GetContainerRuntime(c)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error creating libpod runtime")
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/containers/libpod/cmd/podman/libpodruntime"
|
||||
"github.com/containers/libpod/libpod"
|
||||
"github.com/containers/libpod/pkg/rootless"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
@ -39,6 +40,9 @@ func runCmd(c *cli.Context) error {
|
||||
if err := createInit(c); err != nil {
|
||||
return err
|
||||
}
|
||||
if os.Geteuid() != 0 {
|
||||
rootless.SetSkipStorageSetup(true)
|
||||
}
|
||||
|
||||
runtime, err := libpodruntime.GetContainerRuntime(c)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user