From 3ca4c119d1a90534943b4327519d19a3c94aeb27 Mon Sep 17 00:00:00 2001 From: Kimbro Staken Date: Mon, 8 Jul 2013 00:11:45 -0700 Subject: [PATCH 1/3] Override Entrypoint picked up from the base image that breaks run commands in builder Upstream-commit: f3d29695608d9ea9a3f92bcf872c62e158106919 Component: engine --- components/engine/buildfile.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/engine/buildfile.go b/components/engine/buildfile.go index 570a4eb72c..df413a61fc 100644 --- a/components/engine/buildfile.go +++ b/components/engine/buildfile.go @@ -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 { From 1a5cae3fdb0657a9bc95e66e211bed899282800b Mon Sep 17 00:00:00 2001 From: Kimbro Staken Date: Mon, 8 Jul 2013 00:18:47 -0700 Subject: [PATCH 2/3] Cleanup white space Upstream-commit: 1d1d81b0bc52c6aff652f5515fd792f76e40f7c2 Component: engine --- components/engine/buildfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/buildfile.go b/components/engine/buildfile.go index df413a61fc..303baac318 100644 --- a/components/engine/buildfile.go +++ b/components/engine/buildfile.go @@ -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 From 13025daedd786eec8021015a39ca9870fba71dc0 Mon Sep 17 00:00:00 2001 From: Kimbro Staken Date: Mon, 8 Jul 2013 16:03:18 -0700 Subject: [PATCH 3/3] Removing the save to disk as it was not really necessary Upstream-commit: 2b5553144a9249bbfed9be2a181b051a66350cb1 Component: engine --- components/engine/buildfile.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/engine/buildfile.go b/components/engine/buildfile.go index 303baac318..75e31dba70 100644 --- a/components/engine/buildfile.go +++ b/components/engine/buildfile.go @@ -281,10 +281,7 @@ func (b *buildFile) run() (string, error) { // 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 - } + c.Args = b.config.Cmd[1:] //start the container hostConfig := &HostConfig{}