mirror of
https://github.com/docker/cli.git
synced 2026-09-26 01:10:35 -04:00
Merge pull request #36271 from dnephin/use-tag-image-in-commit
Use TagImage in Commit Upstream-commit: 060893ab5d97d6582770224db3623ad1b3bdb6e1 Component: engine
This commit is contained in:
@@ -29,7 +29,7 @@ type imageBackend interface {
|
||||
ImageHistory(imageName string) ([]*image.HistoryResponseItem, error)
|
||||
Images(imageFilters filters.Args, all bool, withExtraAttrs bool) ([]*types.ImageSummary, error)
|
||||
LookupImage(name string) (*types.ImageInspect, error)
|
||||
TagImage(imageName, repository, tag string) error
|
||||
TagImage(imageName, repository, tag string) (string, error)
|
||||
ImagesPrune(ctx context.Context, pruneFilters filters.Args) (*types.ImagesPruneReport, error)
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ func (s *imageRouter) postImagesTag(ctx context.Context, w http.ResponseWriter,
|
||||
if err := httputils.ParseForm(r); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.backend.TagImage(vars["name"], r.Form.Get("repo"), r.Form.Get("tag")); err != nil {
|
||||
if _, err := s.backend.TagImage(vars["name"], r.Form.Get("repo"), r.Form.Get("tag")); err != nil {
|
||||
return err
|
||||
}
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
|
||||
Reference in New Issue
Block a user