standard_init_linux.go:190: exec user process caused “No such file or directory” while running Docker image

Refresh

April 2019

Views

14 time

0

I have a Docker base image containing filesystem prepared for ARM architecture. It was built simply from this Dockerfile:

FROM scratch
COPY system/ /

"system" folder contains standard Linux folders:

bin  boot  dev  etc  home  lib  media  mnt  opt  proc  run  sbin  sys  tmp  usr  var

My problem is that when I'm trying to run this image (only for filesystem browsing purposes) with docker run:

docker run -it my_filesystem /bin/bash

I receive error:

standard_init_linux.go:190: exec user process caused "no such file or directory"

What is wrong here? I've read about all of those EOL conversion issues, but it seems like not a similar problem, because I'm doing this on Ubuntu 16.04.1.

Of course this filesystem base image will be used in another images, also using QEMU tools, but first I would like to simply look inside this with Docker. Here's the output of docker inspect my_filesystem command:

[
    {
        "Id": "sha256:16e6e19354e9c5a1540b67ec7bd50277214712de166f0c899ce243c1df04d048",
        "RepoTags": [
            "my_filesystem:latest"
        ],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "Imported from -",
        "Created": "2019-04-12T07:05:51.236184413Z",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "18.03.1-ce",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 335976461,
        "VirtualSize": 335976461,
        "GraphDriver": {
            "Data": null,
            "Name": "aufs"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:0b7b9c0eadf64cdd4c6504f735811f0967db1ecc78750b57da99f83c94dc6002"
            ]
        },
        "Metadata": {
            "LastTagTime": "2019-04-12T09:05:51.30738126+02:00"
        }
    }
]

What else should be done maybe in Dockerfile? Official Docker documentation is very laconic and not helpful at all.

I guess some entrypoint may be necessary here, but don't have any ideas how to adapt it to my specific problem.

EDIT Some aditions due to Kamil Cuk's comment:

docker --version

Docker version 18.03.1-ce, build 9ee9f40

file system/bin/bash

system/bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=99b7a5683b2555dcfb39ec3ec11136ed6fc47922, stripped

uname -a

Linux host-VirtualBox 4.15.0-34-generic #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Also when I try to run executable bash from system/bin/bash directory, I have an error:

bash: ./bash: No such file or directory

Similar when I try to cat some scripts there is also error No such file...

0 answers