diff options
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/entities/images.go | 2 | ||||
-rw-r--r-- | pkg/domain/infra/abi/images.go | 1 | ||||
-rw-r--r-- | pkg/domain/infra/abi/system.go | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go index cb970b09a..3a12a4e22 100644 --- a/pkg/domain/entities/images.go +++ b/pkg/domain/entities/images.go @@ -137,6 +137,8 @@ type ImagePullOptions struct { // OverrideOS will overwrite the local operating system (OS) for image // pulls. OverrideOS string + // OverrideVariant will overwrite the local variant for image pulls. + OverrideVariant string // Quiet can be specified to suppress pull progress when pulling. Ignored // for remote calls. Quiet bool diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index 70d740bb5..6b94ca9c0 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -251,6 +251,7 @@ func (ir *ImageEngine) Pull(ctx context.Context, rawImage string, options entiti DockerCertPath: options.CertDir, OSChoice: options.OverrideOS, ArchitectureChoice: options.OverrideArch, + VariantChoice: options.OverrideVariant, DockerInsecureSkipTLSVerify: options.SkipTLSVerify, } diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index 478fac1d5..ff1052d86 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -8,6 +8,7 @@ import ( "os/exec" "path/filepath" "strconv" + "strings" "github.com/containers/common/pkg/config" "github.com/containers/podman/v2/libpod/define" @@ -73,7 +74,7 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command) initCommand, err := ioutil.ReadFile("/proc/1/comm") // On errors, default to systemd - runsUnderSystemd := err != nil || string(initCommand) == "systemd" + runsUnderSystemd := err != nil || strings.TrimRight(string(initCommand), "\n") == "systemd" unitName := fmt.Sprintf("podman-%d.scope", os.Getpid()) if runsUnderSystemd || conf.Engine.CgroupManager == config.SystemdCgroupsManager { |