mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add a Builder.Commit method
This commit is contained in:
parent
97215ca384
commit
7bccdc0d33
1 changed files with 5 additions and 1 deletions
|
@ -41,6 +41,10 @@ func (builder *Builder) Run(image *Image, cmd ...string) (*Container, error) {
|
||||||
return container, nil
|
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{}) {
|
func (builder *Builder) clearTmp(containers, images map[string]struct{}) {
|
||||||
for c := range containers {
|
for c := range containers {
|
||||||
tmp := builder.runtime.Get(c)
|
tmp := builder.runtime.Get(c)
|
||||||
|
@ -106,7 +110,7 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit the container
|
// Commit the container
|
||||||
base, err := builder.runtime.Commit(c.Id, "", "", "", "")
|
base, err := builder.Commit(c, "", "", "", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue