mirror of
https://github.com/containers/podman.git
synced 2025-06-01 17:17:47 +08:00
Set Entrypoint from image only if not already set
Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #827 Approved by: rhatdan
This commit is contained in:
@ -242,8 +242,10 @@ func (c *Container) setupStorage(ctx context.Context) error {
|
||||
}
|
||||
|
||||
// Set the default Entrypoint and Command
|
||||
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
|
||||
if len(c.config.Command) == 0 {
|
||||
if c.config.Entrypoint == nil {
|
||||
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
|
||||
}
|
||||
if c.config.Command == nil {
|
||||
c.config.Command = containerInfo.Config.Config.Cmd
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user