mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9c332b164f
Currently, daemonbuilder package (part of daemon) implemented the builder backend. However, it was a very thin wrapper around daemon methods and caused an implementation dependency for api/server build endpoint. api/server buildrouter should only know about the backend implementing the /build API endpoint. Removing daemonbuilder involved moving build specific methods to respective files in the daemon, where they fit naturally. Signed-off-by: Anusha Ragunathan <anusha@docker.com>
18 lines
629 B
Go
18 lines
629 B
Go
package build
|
|
|
|
import (
|
|
"github.com/docker/docker/builder"
|
|
"github.com/docker/engine-api/types"
|
|
"io"
|
|
)
|
|
|
|
// Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.
|
|
type Backend interface {
|
|
// Build builds a Docker image referenced by an imageID string.
|
|
//
|
|
// Note: Tagging an image should not be done by a Builder, it should instead be done
|
|
// by the caller.
|
|
//
|
|
// TODO: make this return a reference instead of string
|
|
Build(config *types.ImageBuildOptions, context builder.Context, stdout io.Writer, stderr io.Writer, out io.Writer, clientGone <-chan bool) (string, error)
|
|
}
|