mirror of
https://github.com/containers/podman.git
synced 2025-12-13 18:37:36 +08:00
No entrpoint, cmd, or command
When an image does not have an ENTRYPOINT nor a CMD and the user does not provide a command in the CLI, we should fail gracefully. This resolves issue #328 Signed-off-by: baude <bbaude@redhat.com> Closes: #333 Approved by: mheon
This commit is contained in:
@@ -587,6 +587,10 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime, imageName string,
|
||||
command = append(command, data.ContainerConfig.Cmd...)
|
||||
}
|
||||
|
||||
if len(command) == 0 {
|
||||
return nil, errors.Errorf("No command specified on command line or as CMD or ENTRYPOINT in this image")
|
||||
}
|
||||
|
||||
// EXPOSED PORTS
|
||||
portBindings, err := exposedPorts(c, data.ContainerConfig.ExposedPorts)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user