--entrypoint= should delete existing entrypoint

Resolves: #572

Signed-off-by: baude <bbaude@redhat.com>

Closes: #585
Approved by: mheon
This commit is contained in:
baude
2018-04-03 09:12:39 -05:00
committed by Atomic Bot
parent 750f000e7c
commit 6fab1c1b78

View File

@ -547,7 +547,10 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime, imageName string,
if len(entrypoint) == 0 {
entrypoint = data.ContainerConfig.Entrypoint
}
// if entrypoint=, we need to clear the entrypoint
if len(entrypoint) == 1 && c.IsSet("entrypoint") && strings.Join(c.StringSlice("entrypoint"), "") == "" {
entrypoint = []string{}
}
// Build the command
// If we have an entry point, it goes first
if len(entrypoint) > 0 {