mirror of
https://github.com/containers/podman.git
synced 2025-06-11 10:25:41 +08:00
fix: Don't override entrypoint if it's nil
This change ensures that we only override a container's entrypoint if it is set to something other than `nil`. Signed-off-by: Matt Brindley <58414429+maybe-sybr@users.noreply.github.com>
This commit is contained in:
@ -287,10 +287,11 @@ func (c *CreateConfig) getContainerCreateOptions(runtime *libpod.Runtime, pod *l
|
|||||||
options = append(options, libpod.WithCommand(c.UserCommand))
|
options = append(options, libpod.WithCommand(c.UserCommand))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add entrypoint unconditionally
|
// Add entrypoint if it was set
|
||||||
// If it's empty it's because it was explicitly set to "" or the image
|
// If it's empty it's because it was explicitly set to ""
|
||||||
// does not have one
|
if c.Entrypoint != nil {
|
||||||
options = append(options, libpod.WithEntrypoint(c.Entrypoint))
|
options = append(options, libpod.WithEntrypoint(c.Entrypoint))
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: MNT, USER, CGROUP
|
// TODO: MNT, USER, CGROUP
|
||||||
options = append(options, libpod.WithStopSignal(c.StopSignal))
|
options = append(options, libpod.WithStopSignal(c.StopSignal))
|
||||||
|
Reference in New Issue
Block a user