Raspberry-pi docker error: standard_init_linux.go:178: exec user process caused exec format error
Raspberries use ARM and not x86_64 processors. You can only run images created for that architecture. Try searching for ARM or ARMv7 on docker hub. There is a Debian image for ARM I know of but there must be others as well.
The underlying issue is that the binary format used by ARM is not compatible with x86_64, which is the architecture used by most desktop and server systems.
Docker error: standard_init_linux.go:228: exec user process caused: exec format error
A "multiarch" Python interpreter built on MacOS is intended to target MacOS-on-Intel and MacOS-on-Apple's-arm64.
There is absolutely no binary compatibility with Linux-on-Apple's-arm64, or with Linux-on-aarch64. You can't run MacOS executables on Linux, no matter if the architecture matches or not.
standard_init_linux.go:178: exec user process caused exec format error
I forgot to put
#!/bin/bash
at the top of the sh file, problem solved.
standard_init_linux.go:207: exec user process caused exec format error - Raspberry Pi 4
Posting comment as the community wiki answer for better visibility:
Reinstalling both Kubernetes and Docker solves the issue
standard_init_linux.go:211: exec user process caused exec format error
I can see that you add the command command: [/app/helloworld.py]
to yaml file.
so you need to (in Dockerfile):
RUN chmod +x /app/helloworld.py
set shebang to your py
file:
#!/usr/bin/env python # whatever your defualt python to run the script
or setup the command the same as you did in Dockerfile
standard_init_linux.go:207: exec user process caused exec format error
I've experienced similar issues that was caused by the docker image being built on one architecture (say AMD64) but then failed when trying to run on a different architecture (ARM64).
Look into QEMU
tutorial
docker ref
docker buildx exec user process caused: exec format error
To cross-compile requires qemu-user-static
and infmt-support
.
$ sudo apt install -y qemu-user-static binfmt-support
qemu-user-static
for user mode emulation of QEMU, and binfmt_misc
for switching to QEMU when read other executable binary. Then, tell docker to use them.
$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
You must be afraid to run unknown image as privileged, but the content is safe. Next, create a user in docker for building images.
$ docker buildx create --name sofia # name as you like
$ docker buildx use sofia
$ docker buildx inspect --bootstrap
If you success, buildkit
will be pulled:
[+] Building 9.4s (1/1) FINISHED
=> [internal] booting buildkit 9.4s
=> => pulling image moby/buildkit:buildx-stable-1 8.7s
=> => creating container buildx_buildkit_sofia0 0.7s
Name: sofia
Driver: docker-container
Nodes:
Name: sofia0
Endpoint: unix:///var/run/docker.sock
Status: running
Platforms: linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6
Available targets expand!
Reference:
Building Multi-Architecture Docker Images With Buildx | by Artur Klauser | Medium
Related Topics
Hbase Does Not Run After ./Start-Hbase.Sh - Permission Denied
Binding on a Port with Netpipes/Netcat
How Does Linux Kernel Prevents The Bios System Calls
Apache/Httpd /Var/Www/HTML/ .Cgi Scripts Throw 500 Internal Server Error
Sending Snmp2 Trap Message from Linux Command Lne
Can Inotify Tell Me Where a Monitored File Is Moved
Calculator in Assembly Language - Linux X86 & Nasm - Division
Unzip in Current Directory While Preserving File Structure
How to Get a Faster Output Pipe Than /Dev/Null
How to Flush Stdout of a Running Process
Detect When Reader Closes Named Pipe (Fifo)
The Only Overhead Incurred by Fork Is Page Table Duplication and Process Id Creation
Where Do You Send The Kernel Console on an Embedded System
Terraform - Unable to Run Multiple Commands in Local Exec
Qt - How to Detect Whether The Application Is Running on Gnome or Kde