{{ define "layers-section" }}

Layers ({{ len .Layers }})

{{ if .ConfigFetchError }} {{/* Hold is reachable but the config blob fetch failed, so layer commands are missing. DB layers are still rendered below. */}} {{ template "alert" (dict "Type" "warning" "Message" "Layer commands couldn't be loaded from the hold. Showing what we have from the registry.") }} {{ end }} {{ if .Layers }}
{{ range .Layers }} {{ end }}
Image layer history
# Command Size
{{ .Index }} {{ if .Command }} {{ .Command }} {{ else if not .EmptyLayer }} no command recorded {{ end }} {{ humanizeBytes .Size }}
{{ else }} {{ template "state-empty" (dict "Icon" "history" "Title" "No layer history" "Subtext" "This image was built without history metadata, common for squashed images or tarballs imported with docker load." ) }} {{ end }}
{{ end }}