diff options
-rw-r--r-- | libpod/image/image.go | 10 | ||||
-rw-r--r-- | pkg/api/handlers/images_build.go | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index c0baf2e00..bce10e24c 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -841,15 +841,17 @@ func (i *Image) History(ctx context.Context) ([]*History, error) { delete(topLayerMap, layer.ID) } } - - allHistory = append(allHistory, &History{ + h := History{ ID: id, Created: oci.History[x].Created, CreatedBy: oci.History[x].CreatedBy, Size: size, Comment: oci.History[x].Comment, - Tags: layer.Names, - }) + } + if layer != nil { + h.Tags = layer.Names + } + allHistory = append(allHistory, &h) if layer != nil && layer.Parent != "" && !oci.History[x].EmptyLayer { layer, err = i.imageruntime.store.Layer(layer.Parent) diff --git a/pkg/api/handlers/images_build.go b/pkg/api/handlers/images_build.go index 0ea480315..c7c746392 100644 --- a/pkg/api/handlers/images_build.go +++ b/pkg/api/handlers/images_build.go @@ -19,12 +19,6 @@ import ( ) func BuildImage(w http.ResponseWriter, r *http.Request) { - // contentType := r.Header.Get("Content-Type") - // if contentType != "application/x-tar" { - // Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest, errors.New("/build expects Content-Type of 'application/x-tar'")) - // return - // } - authConfigs := map[string]AuthConfig{} if hasHeader(r, "X-Registry-Config") { registryHeader := getHeader(r, "X-Registry-Config") |