Signed-off-by: Antonio Murdaca <runcom@redhat.com>
| ... | ... |
@@ -527,11 +527,9 @@ func (b *Builder) create() (string, error) {
|
| 527 | 527 |
b.tmpContainers[c.ID] = struct{}{}
|
| 528 | 528 |
fmt.Fprintf(b.Stdout, " ---> Running in %s\n", stringid.TruncateID(c.ID)) |
| 529 | 529 |
|
| 530 |
- if len(config.Cmd) > 0 {
|
|
| 531 |
- // override the entry point that may have been picked up from the base image |
|
| 532 |
- if err := b.docker.ContainerUpdateCmdOnBuild(c.ID, config.Cmd); err != nil {
|
|
| 533 |
- return "", err |
|
| 534 |
- } |
|
| 530 |
+ // override the entry point that may have been picked up from the base image |
|
| 531 |
+ if err := b.docker.ContainerUpdateCmdOnBuild(c.ID, config.Cmd); err != nil {
|
|
| 532 |
+ return "", err |
|
| 535 | 533 |
} |
| 536 | 534 |
|
| 537 | 535 |
return c.ID, nil |
| ... | ... |
@@ -25,6 +25,9 @@ func (daemon *Daemon) ContainerUpdate(name string, hostConfig *container.HostCon |
| 25 | 25 |
|
| 26 | 26 |
// ContainerUpdateCmdOnBuild updates Path and Args for the container with ID cID. |
| 27 | 27 |
func (daemon *Daemon) ContainerUpdateCmdOnBuild(cID string, cmd []string) error {
|
| 28 |
+ if len(cmd) == 0 {
|
|
| 29 |
+ return nil |
|
| 30 |
+ } |
|
| 28 | 31 |
c, err := daemon.GetContainer(cID) |
| 29 | 32 |
if err != nil {
|
| 30 | 33 |
return err |