Override Entrypoint picked up from the base image that breaks run commands in builder
This commit is contained in:
parent
e2b8ee2723
commit
f3d2969560
1 changed files with 8 additions and 1 deletions
|
@ -108,7 +108,7 @@ func (b *buildFile) CmdRun(args string) error {
|
|||
} else {
|
||||
utils.Debugf("[BUILDER] Cache miss")
|
||||
}
|
||||
|
||||
|
||||
cid, err := b.run()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -279,6 +279,13 @@ func (b *buildFile) run() (string, error) {
|
|||
b.tmpContainers[c.ID] = struct{}{}
|
||||
fmt.Fprintf(b.out, " ---> Running in %s\n", utils.TruncateID(c.ID))
|
||||
|
||||
// override the entry point that may have been picked up from the base image
|
||||
c.Path = b.config.Cmd[0]
|
||||
c.Args = b.config.Cmd[1:]
|
||||
if err := c.ToDisk(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
//start the container
|
||||
hostConfig := &HostConfig{}
|
||||
if err := c.Start(hostConfig); err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue