mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
Fix handling of command in images
Currently we are dropping the command entry from the create line and using the image Cmd. This change will only use the image Cmd if the user did not specify a Cmd. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #823 Approved by: umohnani8
This commit is contained in:

committed by
Atomic Bot

parent
5f0d4b10e9
commit
05bc77f0cb
@ -243,7 +243,9 @@ func (c *Container) setupStorage(ctx context.Context) error {
|
|||||||
|
|
||||||
// Set the default Entrypoint and Command
|
// Set the default Entrypoint and Command
|
||||||
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
|
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
|
||||||
c.config.Command = containerInfo.Config.Config.Cmd
|
if len(c.config.Command) == 0 {
|
||||||
|
c.config.Command = containerInfo.Config.Config.Cmd
|
||||||
|
}
|
||||||
|
|
||||||
artifacts := filepath.Join(c.config.StaticDir, artifactsDir)
|
artifacts := filepath.Join(c.config.StaticDir, artifactsDir)
|
||||||
if err := os.MkdirAll(artifacts, 0755); err != nil {
|
if err := os.MkdirAll(artifacts, 0755); err != nil {
|
||||||
|
Reference in New Issue
Block a user