wg-manager
wg-manager copied to clipboard
Docker fails to start with "standard_init_linux.go:219: exec user process caused: exec format error"
System: Raspberry PI 4 8GB with Ubuntu 20.04 64 Bit
uname -a output:
Linux glaedr 5.4.0-1025-raspi #28-Ubuntu SMP PREEMPT Wed Dec 9 17:10:53 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
Docker image id: 6d2b6854ef17
docker-compose.yaml is the example one from README.md.
Preview of docker-compose up
:
standard_init_linux.go:219: exec user process caused: exec format error
standard_init_linux.go:219: exec user process caused: exec format error
standard_init_linux.go:219: exec user process caused: exec format error
standard_init_linux.go:219: exec user process caused: exec format error
standard_init_linux.go:219: exec user process caused: exec format error
standard_init_linux.go:219: exec user process caused: exec format error
standard_init_linux.go:219: exec user process caused: exec format error
standard_init_linux.go:219: exec user process caused: exec format error
This I believe is due to the incorrect architecture. I would take a guess that you are trying to run amd64 on the PI, but PI is ARM.
Because you have an RPI with 8 GB, it has sufficient memory to compile the docker images. comment out or remove the image
key in the docker-compose file and add
build:
context: https://github.com/perara/wg-manager.git#master
This will probably take an hour or so. Please report back if this worked, and I'll try to set up similar builds as multi-arch building currently is bugged
Same here!
I have IoT devices and if I pull and image compiled from github ci (amd) does not work, so, I have to build the image into one of the devices and the push it to the server for the other devices.
Solution:
- Build image into Pi (arm architecture)
docker build -t ghcr.io/{repo}/{image}:{version}-armv7l .
docker push ghcr.io/{repo}/{image}:{version}-armv7l
@maguri and @DasBiest try to build using the buildx targeting to --platform linux/arm/v7. This article explains how it works https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/
Hope it helps