Hi, I have a fresh install of Rocky 9.5.
Also I have a container file that looks like this:
FROM rockylinux:9
COPY . .
RUN dnf -y update && dnf -y install git && dnf clean all
WORKDIR /buildbox
USER buildbox
ENTRYPOINT [ "sleep", "infinity" ]
I get this error on build command: podman build -t buildbox1 .
:
STEP 3/7: RUN dnf -y update && dnf -y install git && dnf clean all
error running container: from /usr/bin/crun creating container for [/bin/sh -c dnf -y update && dnf -y install git && dnf clean all]: executable file `/bin/sh` not found in $PATH: No such file or directory
: exit status 1
ERRO[0000] did not get container create message from subprocess: EOF
Error: building at STEP "RUN dnf -y update && dnf -y install git && dnf clean all": while running runtime: exit status 1
This is not my experience on other vendors. I don’t know where to start, because I haven’t done anything on the system yet that would cause it. (It’s so new) so don’t know what to roll back.
Things I’ve done:
- I’ve turned of selinux.
- I’ve tried with Fedora
FROM quay.io/fedora/fedora:41/0
and Rocky images, get the same error. - if I run
podman run hello
it works as expected. So doubly lost. - I get this error anytime I do a
RUN
from any image. If I take out theRUN
it builds and runs fine, I can exec to bash. podman run --rm -it quay.io/fedora/fedora:41 ls -l /bin/sh
works
Any suggestions on how to resolve this? Thx
UPDATE:
- added another step to things I’ve done.
- It looks like the
COPY . .
is causing the problem, not sure how, and it seems weird. So probably not a Rocky Problem. Leave it up if anyone has any insight