Repository navigation
Closed
Description
Here is a simple Dockerfile to reproduce the problem:
###
### Core Image
###
FROM fedora:42
# Create the user
ARG USERNAME=container
ARG USER_UID=1001
ARG USER_GID=${USER_UID}
RUN set -eux; \
groupadd --gid ${USER_GID} ${USERNAME}; \
useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME}; \
usermod -a -G wheel ${USERNAME}; \
echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Switch to the new user
USER ${USERNAME}
WORKDIR /home/${USERNAME}
RUN set -eux; \
sudo dnf update --refresh -yWhen I tried to run the following commands to build a amd64 container, I'm getting a permission error when trying to execute a simple sudo command with the new user:
> container system start
> container build --os linux --arch amd64 -t fedora-image -f "./Dockerfile" .
container run --os linux --arch amd64 --name fedora-devenv --interactive --tty fedora-image
=> ERROR [linux/amd64 3/4] RUN set -eux; sudo dnf update --refresh -y 0.1s
------
> [linux/amd64 3/4] RUN set -eux; sudo dnf update --refresh -y:
0.104 + sudo dnf update --refresh -y
0.107 Error while loading /usr/sbin/sudo: Permission deniedWhereas the same building on aarch64 does not produce any error:
> container system start
> container build --os linux -t fedora-image -f "./Dockerfile" .
container run --os linux --name fedora-devenv --interactive --tty fedora-image
=> exporting to oci image format 0.7s
=> => exporting layers 0.0s
=> => exporting manifest sha256:016b55442e346cebbd4c7bc29a296444f62fb02a59e82997658cbb17bc18eeb6 0.0s
=> => exporting config sha256:b499a6caaaa08310ebaafbc42fa8cd80550c629b32559d601a4a7fc752be7dcd 0.0s
=> => exporting manifest list sha256:70adb02856a72a693d3cf2d2e4b5269eea847e8f5d3c3141a0fa1fdfd3ab3fef 0.0s
=> => sending tarball 0.7s
Successfully built brioche-package:latest
[container@fedora-devenv ~]$Any idea of what could be the culprit here ?
Reacted by kamel1239 and liontari.ai
Metadata
Metadata
Assignees
Labels
No labels
Activity
jglogan commentedon Jan 14, 2026
@jaudiger I just tried reproducing this one on main and don't see this happening for me. If you have time can you check on your end?
jaudiger commentedon Jan 16, 2026
Indeed the issue seems to have been resolve since I opened this issue @jglogan:
Thanks for the reminder, I'll close the ticket.