perara / wg-manager

A easy to use WireGuard dashboard and management tool
MIT License
594 stars 74 forks source link

Docker fails to start with "standard_init_linux.go:219: exec user process caused: exec format error" #69

Open DatDucati opened 3 years ago

DatDucati commented 3 years ago

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
perara commented 3 years ago

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

maguri commented 3 years ago

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:

feokuma commented 3 years ago

@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