alpinelinux / docker-alpine

Official Alpine Linux Docker image. Win at minimalism!
MIT License
1.09k stars 261 forks source link

standard_init_linux.go:211: exec user process caused "no such file or directory" #108

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi,

Pulled the official image of arm32v7/alpine:latest. Tried going inside the container using the below command: docker run -it arm32v7/alpine:latest "/bin/sh"

But it is giving me below error: standard_init_linux.go:211: exec user process caused "no such file or directory"

It was working fine few weeks before when I tried. Now it is giving this error..

Any help on this would be appreciated

westwind-sc commented 4 years ago

Hi @nikhil-kumawat-1991,

I have retry you command, but could not reproduce the issue. could you use docker images arm32v7/alpine:latest to get the Image ID? Then we could check whether we are using the same image.

Attached the logs:

➜  ~ docker run -it arm32v7/alpine:latest "/bin/sh"
Unable to find image 'arm32v7/alpine:latest' locally
latest: Pulling from arm32v7/alpine
52278dd8e579: Pull complete
Digest: sha256:c929c5ca1d3f793bfdd2c6d6d9210e2530f1184c0f488f514f1bb8080bb1e82b
Status: Downloaded newer image for arm32v7/alpine:latest
/ # hostname
416e57c97744
/ # exit
➜  ~ docker images arm32v7/alpine:latest
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
arm32v7/alpine      latest              7e4bece93b3e        3 months ago        3.77MB
➜  ~
ghost commented 4 years ago

Hi @westwind-sc

I checked the image ID and it is same.

docker images arm32v7/alpine latest 7e4bece93b3e 3 months ago 3.77MB

I tried removing the image and pulled the image again and still getting the same error:

`docker run -it arm32v7/alpine:latest "/bin/sh"

Unable to find image 'arm32v7/alpine:latest' locally latest: Pulling from arm32v7/alpine 52278dd8e579: Pull complete Digest: sha256:c929c5ca1d3f793bfdd2c6d6d9210e2530f1184c0f488f514f1bb8080bb1e82b Status: Downloaded newer image for arm32v7/alpine:latest standard_init_linux.go:211: exec user process caused "no such file or directory" `

westwind-sc commented 4 years ago

Hi @nikhil-kumawat-1991,

It depends on the architecture of the host. I was using Docker for Mac to test the command docker run -it arm32v7/alpine:latest "/bin/sh". Docker for Mac have built-in binfmt_misc multi-architecture support as said in https://docs.docker.com/docker-for-mac/multi-arch/.

This does not require any special configuration in the container itself as it uses qemu-static from the Docker for Mac VM. Because of this, you can run an ARM container, like the arm32v7 or ppc64le variants of the busybox image.

If you test that in Linux x86_64/amd64, it seem you have to setup multi-architecture by yourself.

http://wiki.qemu.org/ https://github.com/multiarch/qemu-user-static Above two pages may could help you set up that.

leo2105 commented 3 years ago

Try using this

$ docker run --rm --privileged multiarch/qemu-user-static:register --reset

$ docker run --rm -t arm64v8/ubuntu uname -m standard_init_linux.go:211: exec user process caused "no such file or directory"

$ docker run --rm -t -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static arm64v8/ubuntu uname -m aarch64

Link : https://github.com/multiarch/qemu-user-static