Uploaded image for project: 'Container Tools'
  1. Container Tools
  2. RUN-3097

[containers/buildah] Unable to suppress inheritance of annotations from base image

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • rhel-container-tools
    • RUN 272

      [3037216177] Upstream Reporter: Jack Whelpton
      Upstream issue status: Closed
      Upstream description:

      Issue Description

      Looking to remove (rather than overwrite) some annotations present in the base image, but seem unable to do so.

      Steps to reproduce the issue

      Have tried various permutations such as:

      buildah bud --annotation org.opencontainers.image.url=-
      
      buildah bud --annotation org.opencontainers.image.url- .
      

      Have also experimented with the inherit-labels=false flag.

      Describe the results you received

      In the first case, the annotation acquires the literal value -. In the second case, a new annotation with a trailing dash in the name is created. The inherit-labels flag appears to have no impact on annotations.

      Describe the results you expected

      The annotation org.opencontainers.image.url present in the base image should no longer be visible in the new derived image.

      buildah version output

      Version:         1.40.0
      Go Version:      go1.24.2
      Image Spec:      1.1.1
      Runtime Spec:    1.2.1
      CNI Spec:        1.1.0
      libcni Version:  v1.3.0
      image Version:   5.35.0
      Git Commit:      ff62e3e8a5da56352e90039fb4747ff8438b7b5c
      Built:           Mon Apr 21 18:24:35 2025
      OS/Arch:         linux/amd64
      BuildPlatform:   linux/amd64
      

      buildah info output

      {
          "host": {
              "CgroupVersion": "v2",
              "Distribution": {
                  "distribution": "wolfi",
                  "version": "20230201"
              },
              "MemFree": 25018122240,
              "MemTotal": 32882257920,
              "OCIRuntime": "crun",
              "SwapFree": 0,
              "SwapTotal": 0,
              "arch": "amd64",
              "cpus": 16,
              "hostname": "runner-vvkbyzurm-project-54529948-concurrent-0-6rl9flj5",
              "kernel": "6.1.132",
              "os": "linux",
              "rootless": false,
              "uptime": "1m 49.52s",
              "variant": ""
          },
          "store": {
              "ContainerStore": {
                  "number": 0
              },
              "GraphDriverName": "overlay",
              "GraphOptions": null,
              "GraphRoot": "/var/lib/containers/storage",
              "GraphStatus": {
                  "Backing Filesystem": "overlayfs",
                  "Native Overlay Diff": "false",
                  "Supports d_type": "true",
                  "Supports shifting": "true",
                  "Supports volatile": "true",
                  "Using metacopy": "false"
              },
              "ImageStore": {
                  "number": 20
              },
              "RunRoot": "/run/containers/storage"
          }
      }
      

      Provide your storage.conf

      Unable to find source-code formatter for language: toml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      n/a
      

      Upstream Latest Release

      Yes

      Additional environment details

      No response

      Additional information

      No response


      Upstream URL: https://github.com/containers/buildah/issues/6153

              Unassigned Unassigned
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: