summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-08 14:32:27 +0200
committerGitHub <noreply@github.com>2019-08-08 14:32:27 +0200
commit5701fe6689b93e238b8aa6ce6082c2cddc424b9a (patch)
tree424109047dd573ffae1eb8302031e0b7e23dbb1e /cmd
parent8776a577bf6b86a4e034c54243c5e4a419d14c35 (diff)
parent8d44c61f27a3ffcd288895a705adb740ccb02cbd (diff)
downloadpodman-5701fe6689b93e238b8aa6ce6082c2cddc424b9a.tar.gz
podman-5701fe6689b93e238b8aa6ce6082c2cddc424b9a.tar.bz2
podman-5701fe6689b93e238b8aa6ce6082c2cddc424b9a.zip
Merge pull request #3744 from mheon/fix_command
When populating CMD, do not include Entrypoint
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/shared/create.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 4de68e4bc..8e356cbcb 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -588,6 +588,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
workDir = data.Config.WorkingDir
}
+ userCommand := []string{}
entrypoint := configureEntrypoint(c, data)
// Build the command
// If we have an entry point, it goes first
@@ -597,9 +598,11 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
if len(inputCommand) > 0 {
// User command overrides data CMD
command = append(command, inputCommand...)
+ userCommand = append(userCommand, inputCommand...)
} else if data != nil && len(data.Config.Cmd) > 0 && !c.IsSet("entrypoint") {
// If not user command, add CMD
command = append(command, data.Config.Cmd...)
+ userCommand = append(userCommand, data.Config.Cmd...)
}
if data != nil && len(command) == 0 {
@@ -680,6 +683,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
Cgroupns: c.String("cgroupns"),
CgroupParent: c.String("cgroup-parent"),
Command: command,
+ UserCommand: userCommand,
Detach: c.Bool("detach"),
Devices: c.StringSlice("device"),
DNSOpt: c.StringSlice("dns-opt"),