backend.go 667 B

1234567891011121314151617181920
  1. package build
  2. import (
  3. "io"
  4. "github.com/docker/docker/api/types"
  5. "github.com/docker/docker/api/types/backend"
  6. "golang.org/x/net/context"
  7. )
  8. // Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.
  9. type Backend interface {
  10. // Build builds a Docker image referenced by an imageID string.
  11. //
  12. // Note: Tagging an image should not be done by a Builder, it should instead be done
  13. // by the caller.
  14. //
  15. // TODO: make this return a reference instead of string
  16. BuildFromContext(ctx context.Context, src io.ReadCloser, remote string, buildOptions *types.ImageBuildOptions, pg backend.ProgressWriter) (string, error)
  17. }