Display image digest for container packages (#21170)

fixes #21160
tokarchuk/v1.18
KN4CK3R 2 years ago committed by GitHub
parent cad8f1b1fe
commit ef40324c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      options/locale/locale_en-US.ini
  2. 4
      templates/package/content/container.tmpl

@ -3092,6 +3092,7 @@ container.details.platform = Platform
container.details.repository_site = Repository Site container.details.repository_site = Repository Site
container.details.documentation_site = Documentation Site container.details.documentation_site = Documentation Site
container.pull = Pull the image from the command line: container.pull = Pull the image from the command line:
container.digest = Digest:
container.documentation = For more information on the Container registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/container/">the documentation</a>. container.documentation = For more information on the Container registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/container/">the documentation</a>.
container.multi_arch = OS / Arch container.multi_arch = OS / Arch
container.layers = Image Layers container.layers = Image Layers

@ -14,6 +14,10 @@
<div class="markup"><pre class="code-block"><code>docker pull {{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}}{{$separator}}{{.PackageDescriptor.Version.LowerVersion}}</code></pre></div> <div class="markup"><pre class="code-block"><code>docker pull {{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}}{{$separator}}{{.PackageDescriptor.Version.LowerVersion}}</code></pre></div>
{{end}} {{end}}
</div> </div>
<div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.container.digest"}}</label>
<div class="markup"><pre class="code-block"><code>{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}</code></pre></div>
</div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.container.documentation" | Safe}}</label> <label>{{.locale.Tr "packages.container.documentation" | Safe}}</label>
</div> </div>

Loading…
Cancel
Save