summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/container.go
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2019-04-11 15:59:30 -0400
committerQi Wang <qiwan@redhat.com>2019-05-02 12:14:51 -0400
commita477a8ff755e2807d0745b207d6a5bf57de58e4c (patch)
treea7a6f479c733c42ddc7aca2a30b1c753cf9238bb /cmd/podman/shared/container.go
parent7d05ff3fc772a7be4860ed4a3cd59a62f8bb893a (diff)
downloadpodman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.tar.gz
podman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.tar.bz2
podman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.zip
Add variable for global flags to runlabel
use $GLOBAL_OPTS to pass global flags to the runlabel command. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd/podman/shared/container.go')
-rw-r--r--cmd/podman/shared/container.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go
index 9050fd2b9..fe447d10d 100644
--- a/cmd/podman/shared/container.go
+++ b/cmd/podman/shared/container.go
@@ -883,7 +883,7 @@ func GetRunlabel(label string, runlabelImage string, ctx context.Context, runtim
}
// GenerateRunlabelCommand generates the command that will eventually be execucted by podman
-func GenerateRunlabelCommand(runLabel, imageName, name string, opts map[string]string, extraArgs []string) ([]string, []string, error) {
+func GenerateRunlabelCommand(runLabel, imageName, name string, opts map[string]string, extraArgs []string, globalOpts string) ([]string, []string, error) {
// If no name is provided, we use the image's basename instead
if name == "" {
baseName, err := image.GetImageBaseName(imageName)
@@ -896,7 +896,7 @@ func GenerateRunlabelCommand(runLabel, imageName, name string, opts map[string]s
if len(extraArgs) > 0 {
runLabel = fmt.Sprintf("%s %s", runLabel, strings.Join(extraArgs, " "))
}
- cmd, err := GenerateCommand(runLabel, imageName, name)
+ cmd, err := GenerateCommand(runLabel, imageName, name, globalOpts)
if err != nil {
return nil, nil, errors.Wrapf(err, "unable to generate command")
}