Repository: containers/buildah

Issue #5952: buildah 1.38.1 build "FROM oci-archive:" fails to find content generated inside a build
Created: 2025-01-29T05:19:24Z
quay.io/buildah/stable:v1.38.1 failed to build image with FROM oci-archive:./out.ociarchive and got error:
[2/2] STEP 1/3: FROM oci-archive:./out.ociarchive
Error: creating build container: creating temp directory: archive file not found: "/builds/redhat/rhel/bifrost/compose-bootc/out.ociarchive"

quay.io/buildah/stable:v1.38.0 does not have this issue.

Duplicate issue #5951: Bind mounts in `RUN` statements are not propagating changes to their source correctly
Created: 2025-01-28T16:39:41Z
I have observed strange behavior lately with bind mounts misbehaving in RUN statements and it's causing major issues with some of my workflows. I created a minimal reproducer to highlight the issue.
$ ls -halF src
total 0
drwxr-xr-x. 2 james james 21 Jan 28 11:31 ./
drwxr-xr-x. 3 james james 38 Jan 28 11:34 ../
-rw-r--r--. 1 james james  0 Jan 28 11:31 outside
$ cat Containerfile
FROM registry.fedoraproject.org/fedora:41

RUN --mount=type=bind,src=./src,rw=true,target=/src \
    ls -halF /src && \
    touch /src/inside && \
    ls -halF /src

RUN --mount=type=bind,src=./src,rw=true,target=/src \
    ls -halF /src
$ podman build --security-opt=label=disable .
STEP 1/3: FROM registry.fedoraproject.org/fedora:41
STEP 2/3: RUN --mount=type=bind,src=./src,rw=true,target=/src     ls -halF /src &&     touch /src/inside &&     ls -halF /src
total 0
drwxr-xr-x. 1 root root  6 Jan 28 16:35 ./
dr-xr-xr-x. 1 root root 39 Jan 28 16:35 ../
-rw-r--r--. 1 root root  0 Jan 28 16:31 outside
total 0
drwxr-xr-x. 1 root root 20 Jan 28 16:35 ./
dr-xr-xr-x. 1 root root 39 Jan 28 16:35 ../
-rw-r--r--. 1 root root  0 Jan 28 16:35 inside
-rw-r--r--. 1 root root  0 Jan 28 16:31 outside
--> 18d41e10acde
STEP 3/3: RUN --mount=type=bind,src=./src,rw=true,target=/src     ls -halF /src
total 0
drwxr-xr-x. 1 root root  6 Jan 28 16:35 ./
dr-xr-xr-x. 1 root root 28 Jan 28 16:35 ../
-rw-r--r--. 1 root root  0 Jan 28 16:31 outside
COMMIT
--> 2e663a8d9c25
2e663a8d9c2524996127de6619b6b196c604274b3ec7bda1c283b558b877677a
$ ls -halF src
total 0
drwxr-xr-x. 2 james james 21 Jan 28 11:31 ./
drwxr-xr-x. 3 james james 38 Jan 28 11:34 ../
-rw-r--r--. 1 james james  0 Jan 28 11:31 outside

Within the layer where the bind mount is occurring, the changes are saved. After that layer, including outside the container at all as well as any follow-on layers that re-mount the bind mount, the changes are not propagated at all.
I tried to track down the cause, but rapidly ran out of my depth of understanding for how buildah handles bind mounts.
podman info output:
host:
  arch: amd64
  buildahVersion: 1.38.1
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-3.fc41.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 98.11
    systemPercent: 0.57
    userPercent: 1.32
  cpus: 32
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    version: "41"
  eventLogger: journald
  freeLocks: 2048
  hostname: ws.jharmison.com
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 6.12.10-200.fc41.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 54220419072
  memTotal: 67307999232
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.13.1-1.fc41.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.13.1
    package: netavark-1.13.1-1.fc41.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.13.1
  ociRuntime:
    name: crun
    package: crun-1.19.1-1.fc41.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.19.1
      commit: 3e32a70c93f5aa5fea69b50256cca7fd4aa23c80
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20250121.g4f2c8e7-2.fc41.x86_64
    version: |
      pasta 0^20250121.g4f2c8e7-2.fc41.x86_64
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 1h 51m 32.00s (Approximately 0.04 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
store:
  configFile: /var/home/james/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/james/.local/share/containers/storage
  graphRootAllocated: 1955146625024
  graphRootUsed: 198258196480
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 3
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /var/home/james/.local/share/containers/storage/volumes
version:
  APIVersion: 5.3.2
  Built: 1737504000
  BuiltTime: Tue Jan 21 19:00:00 2025
  GitCommit: ""
  GoVersion: go1.23.4
  Os: linux
  OsArch: linux/amd64
  Version: 5.3.2

Closing comment (2025-02-05T23:00:14Z): I believe this is a duplicate of #5952 (it was filed earlier, but there's a lot more in that issue).