You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUN instruction with bind mounted image is never cached but the same thing using COPY instruction caches ok.
Steps to reproduce the issue
Steps to reproduce the issue
podman build the Containerfile bellow
build again
FROM docker.io/library/debian:12
RUN --mount=type=bind,from=ghcr.io/astral-sh/uv:latest,target=/usr/local/bin uv venv /app
Describe the results you received
The RUN instruction is executed both times, it is not taken from cache for the second build.
Describe the results you expected
The second build should use cache.
podman info output
host:
arch: amd64buildahVersion: 1.38.0cgroupControllers:
- cpu
- memory
- pidscgroupManager: systemdcgroupVersion: v2conmon:
package: conmon_100:2.1.12-1_amd64path: /usr/bin/conmonversion: 'conmon version 2.1.12, commit: e21e7c85b7637e622f21c57675bf1154fc8b1866'cpuUtilization:
idlePercent: 93.73systemPercent: 2.43userPercent: 3.84cpus: 8databaseBackend: sqlitedistribution:
codename: bookwormdistribution: debianversion: "12"eventLogger: journaldfreeLocks: 2047hostname: gsdevidMappings:
gidmap:
- container_id: 0host_id: 1000size: 1
- container_id: 1host_id: 100000size: 65536uidmap:
- container_id: 0host_id: 1000size: 1
- container_id: 1host_id: 100000size: 65536kernel: 6.1.0-27-amd64linkmode: dynamiclogDriver: journaldmemFree: 6692057088memTotal: 7856631808networkBackend: netavarknetworkBackendInfo:
backend: netavarkdns:
package: podman-aardvark-dns_100:1.13.1-1_amd64path: /usr/libexec/podman/aardvark-dnsversion: aardvark-dns 1.13.1package: podman-netavark_100:1.13.0-1_amd64path: /usr/libexec/podman/netavarkversion: netavark 1.13.0ociRuntime:
name: runcpackage: cri-o-runc_100:1.2.2-1_amd64path: /usr/lib/cri-o-runc/sbin/runcversion: |- runc version unknown spec: 1.2.0 go: go1.23.3 libseccomp: 2.5.4os: linuxpasta:
executable: /usr/bin/pastapackage: passt_100:0.0+20241030.ee7d0b62-1_amd64version: | pasta 0.0+20241030.ee7d0b62 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: truepath: /run/user/1000/podman/podman.sockrootlessNetworkCmd: pastasecurity:
apparmorEnabled: falsecapabilities: CAP_AUDIT_WRITE,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_MKNOD,CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOTrootless: trueseccompEnabled: trueseccompProfilePath: /usr/share/containers/seccomp.jsonselinuxEnabled: falseserviceIsRemote: falseslirp4netns:
executable: ""package: ""version: ""swapFree: 1024454656swapTotal: 1024454656uptime: 28h 8m 35.00s (Approximately 1.17 days)variant: ""plugins:
authorization: nulllog:
- k8s-file
- none
- passthrough
- journaldnetwork:
- bridge
- macvlan
- ipvlanvolume:
- localregistries:
search:
- docker.iostore:
configFile: /home/mos/.config/containers/storage.confcontainerStore:
number: 1paused: 0running: 1stopped: 0graphDriverName: overlaygraphOptions: {}graphRoot: /home/mos/.local/share/containers/storagegraphRootAllocated: 249365385216graphRootUsed: 9810419712graphStatus:
Backing Filesystem: extfsNative Overlay Diff: "true"Supports d_type: "true"Supports shifting: "false"Supports volatile: "true"Using metacopy: "false"imageCopyTmpDir: /var/tmpimageStore:
number: 2runRoot: /run/user/1000/containerstransientStore: falsevolumePath: /home/mos/.local/share/containers/storage/volumesversion:
APIVersion: 5.3.0Built: 0BuiltTime: Thu Jan 1 01:00:00 1970GitCommit: ""GoVersion: go1.23.3Os: linuxOsArch: linux/amd64Version: 5.3.0
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
If I change the Containerfile (see bellow), everything is cached. The resulting image is the same but the definition is more complex.
FROM docker.io/library/debian:12 as base
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
RUN uv venv /app
FROM docker.io/library/debian:12
COPY --from=base /app /app
The text was updated successfully, but these errors were encountered:
Issue Description
RUN instruction with bind mounted image is never cached but the same thing using COPY instruction caches ok.
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
The RUN instruction is executed both times, it is not taken from cache for the second build.
Describe the results you expected
The second build should use cache.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
If I change the
Containerfile
(see bellow), everything is cached. The resulting image is the same but the definition is more complex.The text was updated successfully, but these errors were encountered: