Merge pull request #19837 from cpuguy83/carry_19085

Carry 19085 -- Improve & cleanup documentation comments
This commit is contained in:
Arnaud Porterie 2016-01-29 14:30:25 -08:00
commit 46018c3cee
2 changed files with 11 additions and 7 deletions

View file

@ -174,11 +174,15 @@ func (b *Builder) Cancel() {
})
}
// BuildFromConfig will do build directly from parameter 'changes', which comes
// from Dockerfile entries, it will:
// - call parse.Parse() to get AST root from Dockerfile entries
// - do build by calling builder.dispatch() to call all entries' handling routines
// TODO: remove?
// BuildFromConfig builds directly from `changes`, treating it as if it were the contents of a Dockerfile
// It will:
// - Call parse.Parse() to get an AST root for the concatenated Dockerfile entries.
// - Do build by calling builder.dispatch() to call all entries' handling routines
//
// BuildFromConfig is used by the /commit endpoint, with the changes
// coming from the query parameter of the same name.
//
// TODO: Remove?
func BuildFromConfig(config *container.Config, changes []string) (*container.Config, error) {
ast, err := parser.Parse(bytes.NewBufferString(strings.Join(changes, "\n")))
if err != nil {

View file

@ -956,8 +956,8 @@ func (daemon *Daemon) changes(container *container.Container) ([]archive.Change,
return container.RWLayer.Changes()
}
// TagImage creates a tag in the repository reponame, pointing to the image named
// imageName.
// TagImage creates the tag specified by newTag, pointing to the image named
// imageName (alternatively, imageName can also be an image ID).
func (daemon *Daemon) TagImage(newTag reference.Named, imageName string) error {
imageID, err := daemon.GetImageID(imageName)
if err != nil {