Moving runtime.Create to builder.Create

This commit is contained in:
Guillaume J. Charmes 2013-04-24 15:14:10 -07:00
parent 35c59f4e05
commit 602786cd60

View file

@ -274,6 +274,10 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) (*Image, e
fmt.Fprintf(stdout, "===> %s\n", image.ShortId()) fmt.Fprintf(stdout, "===> %s\n", image.ShortId())
break break
} }
config, err := ParseRun([]string{image.Id, "/bin/sh", "-c", tmp[1]}, nil, builder.runtime.capabilities)
if err != nil {
return err
}
// Create the container and start it // Create the container and start it
c, err := builder.Create(config) c, err := builder.Create(config)
@ -283,6 +287,9 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) (*Image, e
if err := c.Start(); err != nil { if err := c.Start(); err != nil {
return nil, err return nil, err
} }
if err := c.Start(); err != nil {
return err
}
tmpContainers[c.Id] = struct{}{} tmpContainers[c.Id] = struct{}{}
// Wait for it to finish // Wait for it to finish