Skip to content

Commit

Permalink
Display image digest for container packages (go-gitea#21170)
Browse files Browse the repository at this point in the history
  • Loading branch information
KN4CK3R authored Sep 14, 2022
1 parent cad8f1b commit ef40324
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3092,6 +3092,7 @@ container.details.platform = Platform
container.details.repository_site = Repository Site
container.details.documentation_site = Documentation Site
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.multi_arch = OS / Arch
container.layers = Image Layers
Expand Down
4 changes: 4 additions & 0 deletions templates/package/content/container.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{{end}}
</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">
<label>{{.locale.Tr "packages.container.documentation" | Safe}}</label>
</div>
Expand Down

0 comments on commit ef40324

Please sign in to comment.