-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker for Mac: standard_init_linux.go:175: exec user process caused "exec format error" #23865
Comments
seeing the same thing |
You need to issue a shell command. Like |
I also issue similar has occurred. old |
Looks like it's not running Raspberry Pi images. I know this was an "undocumented" feature, so not sure something changed in that area ping @avsm @justincormack any idea if something changed? |
Seems that the image is using the |
Docker for Mac is able to run Raspberry Pi images (and others) if the image contains the qemu binary. The rpi-whoami is supposed to be a very small image lacking other binaries, so this does not work out of the box with Docker for Mac. But try one of the resin/rpi-raspbian based images, these will work. Eg. Maybe Docker for Mac magically mounts the qemu binary in the future into the container so that every image just works :-) |
@StefanScherer thanks! yes, I think @justincormack was thinking of doing that, but it's not there yet. Following the above discussion, this doesn't look to be a bug in Docker, so I'll close this, but feel free to continue the discussion |
@thaJeztah @StefanScherer I would be glad to have those suggestions... This should be transparent for Mac users having that Docker can run anything anywhere :) |
Yes we are planning to make it fully transparent in future.
|
What will be the W/A for now? |
I'm seeing the same symptom from packaging a go application |
@archyufa @perrohunter build from an image that supports qemu binary, such as the |
Besides OS X this also happens on Linux Mint 17.3 while running a static compiled Go binary in a Docker scratch container:
|
@marcellodesales please (re)open this issue, guess it's closed by closing hypriot/rpi-whoami#2. |
How did you compile the binary? If you compiled the binary on OS X, it may still be an invalid binary to run on Linux. What happens if you add that binary to a non-scratch image (e.g. alpine or ubuntu), and run the binary from an interactive shell? |
@thaJeztah we compile it static in
Tried to add it in
Tried to install I'm going to add |
I got the similar error on a standalone Odroid c2 as well. |
I'm also having this issue on macos, even basing it on either |
Same here...
Errors:
|
Why is this issue closed, it seems like folks are still hitting it. I'm also hitting this on a Mac when building a go static binary and adding it FROM scratch to a docker container. |
I was able to resolve this error for my docker container by adding a Sha-Bang on top of the shell script that I was trying to run as CMD in dockerfile #!/bin/bash |
@tompscanlan I ran into this and realized I was building the go executable on my Mac and then trying to run it in an Ubuntu container. Updating the build command to the following fixed the issue.
|
@chaslemley agreed. I've since found that verifying the enclosed binary is built statically for the correct base OS seems to fix this problem. |
Had this issue. |
There also may be a BOM signature sitting at the beginning of your file. Use |
One of the reasons why this error could happen is If you are on Windows, make sure that your custom It could happen if you created |
I just ran into this issue. @Holygits What .sh script has a space in it? |
@dalenoe, I think he is talking about his own script. |
@dalenoe the shebang line of my entrypoint script looked like " #!/bin/bash" as opposed to "#!/bin/bash" |
I just ran into this issue. https://github.com/scaleway/image-ubuntu/issues/98 I replaced |
Just encountered this issue as well. Ended up being a layer that wasn't pulled properly. Running |
to fix 'standard_init_linux.go:178: exec user process caused "exec format error"' errors based on: moby/moby#23865 (comment)
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Trying to run on the native Docker for Mac 10.11.5.
Steps to reproduce the issue:
Describe the results you received:
The following error was printed:
standard_init_linux.go:175: exec user process caused "exec format error"
Describe the results you expected:
The process should be running...
Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: