buildah: Duplicate layers in Image inspect information build using podman build #1744

Pulled from https://github.com/containers/libpod/issues/1744

Is this a BUG REPORT or FEATURE REQUEST?:

[//]: kind bug

Description I found this issue with this particular image build using podman build. It shows same layer multiple times when podman inspect is done on image.

It is easily reproducible. I verified with docker build and there is no issue with that.

Steps to reproduce the issue:

  1. git clone https://github.com/couchbase/docker

  2. cd docker/enterprise/couchbase-server/4.0.0

  3. sudo podman build --no-cache -f Dockerfile -t layers .

  4. sudo podman inspect localhost/layers

Describe the results you received:

.
. <snip>
.
           }
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:adb1f7ffb432495d0345c5d1fdb165d0346735210c71fb3e52ca7f79dffe9c23",
                "sha256:cce4153cfb1c52d666664e85e0b00404a4d3407526606a39f19d818b3651b900",
                "sha256:6e62bd7245ce55eca3e19ba147f4ac631015505ef25eba0f123a639bf6056352",
                "sha256:53482344115410633f075abc5a5fd46a1bc351cadcf8da8e53ece564193bf676",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:e68f369c9ce15b881b8ba29155bafcfa1323a1a373b1bb0236391f5e335003c8",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:f94e22c396c09354edd985b86ba9b9ef9e9ae522b9b76cee445948439d0c3f5f",
                "sha256:242e6c9bf23328f055e0c43a8080a8ee0d6534a91564718157a785d3e77b4d4c",
                "sha256:57b28f3f023394662ecf21ed6a940b1e6be115a2bd539b31038943384c07cc01",
                "sha256:9e8cd27c017f6e5628d0b1c68679f69995eccee369878f5065c548c3e399146e",
                "sha256:acd91ad16343831e14abc94571d09a857a83859ccf676fc60ce722ad7972aafb",
                "sha256:76933d355b9c83bc61f18da8f2998b0bb6bcdffc711b78887e8e9e9d5ebe2a95",
                "sha256:5ca03047af89c5f7abad82192f862f4c7fc503d88ce34f4f8afa78178885a08f",
                "sha256:7cbd30472707118744174bc51d66b607533509cde2e70307c29cfbb01f013c03",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
            ]
        },
.
. <snip>
."

Describe the results you expected:

.
. <snip>
.
           }
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:adb1f7ffb432495d0345c5d1fdb165d0346735210c71fb3e52ca7f79dffe9c23",
                "sha256:cce4153cfb1c52d666664e85e0b00404a4d3407526606a39f19d818b3651b900",
                "sha256:6e62bd7245ce55eca3e19ba147f4ac631015505ef25eba0f123a639bf6056352",
                "sha256:53482344115410633f075abc5a5fd46a1bc351cadcf8da8e53ece564193bf676",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                 "sha256:e68f369c9ce15b881b8ba29155bafcfa1323a1a373b1bb0236391f5e335003c8",
                "sha256:f94e22c396c09354edd985b86ba9b9ef9e9ae522b9b76cee445948439d0c3f5f",
                "sha256:242e6c9bf23328f055e0c43a8080a8ee0d6534a91564718157a785d3e77b4d4c",
                "sha256:57b28f3f023394662ecf21ed6a940b1e6be115a2bd539b31038943384c07cc01",
                "sha256:9e8cd27c017f6e5628d0b1c68679f69995eccee369878f5065c548c3e399146e",
                "sha256:acd91ad16343831e14abc94571d09a857a83859ccf676fc60ce722ad7972aafb",
                "sha256:76933d355b9c83bc61f18da8f2998b0bb6bcdffc711b78887e8e9e9d5ebe2a95",
                "sha256:5ca03047af89c5f7abad82192f862f4c7fc503d88ce34f4f8afa78178885a08f",
                "sha256:7cbd30472707118744174bc51d66b607533509cde2e70307c29cfbb01f013c03",
            ]
        },
.
. <snip>
."

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

$ sudo podman version 
[sudo] password for kunal:        
Version:       0.10.2-dev
Go Version:    go1.10
OS/Arch:       linux/amd64

Output of podman info:

$ sudo podman info    
host:
  BuildahVersion: 1.5-dev
  Conmon:
    package: Unknown
    path: /usr/local/libexec/crio/conmon
    version: 'conmon version 1.12.0-dev, commit: b6c5cafeffa9b3cde89812207b29ccedd3102712'
  Distribution:
    distribution: '"elementary"'
    version: 0.4.1
  MemFree: 924573696
  MemTotal: 12580098048
  OCIRuntime:
    package: 'cri-o-runc: /usr/lib/cri-o-runc/sbin/runc'
    path: /usr/lib/cri-o-runc/sbin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree: 12866023424
  SwapTotal: 12866023424
  arch: amd64
  cpus: 8
  hostname: kunal-HP-linux
  kernel: 4.4.0-138-generic
  os: linux
  uptime: 74h 6m 36.38s (Approximately 3.08 days)
insecure registries:
  registries: null
registries:
  registries: null
store:
  ContainerStore:
    number: 1
  GraphDriverName: overlay
  GraphOptions:
  - overlay.override_kernel_check=true
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
  ImageStore:
    number: 35
  RunRoot: /var/run/containers/storage

Additional environment details (AWS, VirtualBox, physical, etc.): On Ubuntu, physical machine.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

@nalind is working on fixing this issue. Basically buildah creates a final image even if the last command in the Dockerfile is not COPY, ADD, or RUN, whereas Docker does not.