Unsupported RUN --mount=…,sharing=private
Author: mathstufCreated Sep 29, 2025Updated Sep 16, 2026
Labelskind/featuretriagedbuild
Feature request description
podman does not support Dockerfiles with RUN --mount=…,sharing=private:
[2/11] STEP 3/3: RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf --mount=type=bind,source=rust_packages.lst,target=/root/rust_packages.lst --mount=type=cache,from=dnf-cache,source=/var/cache
/libdnf5,target=/var/cache/libdnf5,sharing=private --mount=type=tmpfs,target=/var/log --mount=type=tmpfs,target=/tmp dnf install -y $(grep '^[^#]\+$' /root/rust_packages.lst)
Error: building at STEP "RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf --mount=type=bind,source=rust_packages.lst,target=/root/rust_packages.lst --mount=type=cache,from=dnf-cache,source=/var/cache
/libdnf5,target=/var/cache/libdnf5,sharing=private --mount=type=tmpfs,target=/var/log --mount=type=tmpfs,target=/tmp dnf install -y $(grep '^[^#]\+$' /root/rust_packages.lst)": resolving mountpoints for container
"d1cee8a56e897029d21873c1d1d167dbfa80c696ab955c77be6783bf9b80a5a3": unrecognized value "private" for field `sharing`: %!w(<nil>)Suggest potential solution
A clear and concise description of what you want to happen.
Have you considered any alternatives?
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Source: podman-container-tools/podman