Add a Builder.Commit method

Upstream-commit: 7bccdc0d33d0589792b9b867b13c9e50dcf48358
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-05-06 16:00:30 -07:00
parent c9f1300141
commit ab1d9f289b
+5 -1
View File
@@ -41,6 +41,10 @@ func (builder *Builder) Run(image *Image, cmd ...string) (*Container, error) {
return container, nil
}
func (builder *Builder) Commit(container *Container, repository, tag, comment, author string) (*Image, error) {
return builder.runtime.Commit(container.Id, repository, tag, comment, author)
}
func (builder *Builder) clearTmp(containers, images map[string]struct{}) {
for c := range containers {
tmp := builder.runtime.Get(c)
@@ -106,7 +110,7 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) error {
}
// Commit the container
base, err := builder.runtime.Commit(c.Id, "", "", "", "")
base, err := builder.Commit(c, "", "", "", "")
if err != nil {
return err
}