Cisco-Talos / clamav-docker

Dockerfiles for the ClamAV project
35 stars 20 forks source link

exec: "/init-unprivileged": stat /init-unprivileged: no such file or directory: unknown #40

Closed vschoener closed 7 months ago

vschoener commented 7 months ago

Hey,

When running this command locally, I got the following error. Would you happen to know what is wrong? Cause reading your Dockerfile I do see the COPY of the init unprivileged

❯ docker run -it --rm \
      --user "clamav" \
      --entrypoint /init-unprivileged \
      --name "clam_container_01" \
    clamav/clamav:unstable_base 
Unable to find image 'clamav/clamav:unstable_base' locally
        unstable_base: Pulling from clamav/clamav
7264a8db6415: Pull complete 
a12491ef4ba9: Pull complete 
9cfb3c31e879: Pull complete 
f0e5e90185f2: Pull complete 
b6f26fdfc81d: Pull complete 
Digest: sha256:378845ce8e7a7c6a5eee6b7b2b2b3c98ded62ea3e6855098a52e63ffa59783f5
Status: Downloaded newer image for clamav/clamav:unstable_base
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/init-unprivileged": stat /init-unprivileged: no such file or directory: unknown

I also checked if the file was present by connecting to the container and it seems not there:

❯ docker run -it --rm \
      --user "clamav" \
      --entrypoint /bin/sh \
      --name "clam_container_01" \
    clamav/clamav:1.2_base     
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
/ $ ls
bin    etc    init   media  opt    root   sbin   sys    usr
dev    home   lib    mnt    proc   run    srv    tmp    var
/ $ 

Are you sure there is no issue when building the image with this copy command?

Edit: I noticed this script is well present in the https://hub.docker.com/r/clamav/clamav-debian repo one.

I (we) don't understand why there are differences, sorry if it's noted somewhere and I missed it

sampipe commented 7 months ago

Hey..

I second this as its confused me also. The Dockerfile blame shows the COPY of init-unprivledged as being added 3 weeks back, and dockerhub shows the last push of the image 4 days back.

Can we get a check on the build process please?

rsundriyal commented 7 months ago

Looking into it.

rsundriyal commented 7 months ago

@vschoener The issue was with the build system. I have fixed/rebuild clamav/clamav:unstable_base and other images too. I have checked all images for verification. I appreciate your efforts to raise this issue.

Also, there is no difference in clamav/clamav and clamav/clamav-debain images apart from architectures.

@sampipe It was a build process issue. Thanks.

I am closing the issue and appreciate the feedback.