exec user process caused "exec format error"
SA7BNT opened this issue · comments
Hi @SA7BNT.
You are right, compiled binary is for linux
amd64
only, for the moment.
You can easily build for arm
using the Dockerfile.dev
git clone https://github.com/vx3r/wg-gen-web
cd wg-gen-web
docker build -f Dockerfile.dev --tag wg-gen-web-arm .
docker run -it --rm <options and env here> wg-gen-web-dev
I will think about adding arm
support for docker, letting the issue open if there is more requests.
Working for me now. Thanks!
I managed to create a multi-arch wg-gen-web
Docker Image by following this blog post: https://www.docker.com/blog/multi-arch-images/
Here are the steps:
docker buildx create --name wg-web-builder
docker buildx use wg-web-builder
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t mxie/wg-gen-web:latest -f Dockerfile.dev --push .
As a result, the image is now pushed into my fork: https://hub.docker.com/repository/docker/mxie/wg-gen-web
I don't mean to maintain this fork for long term. Just want to show you how this can be done :)
Hi @zmingxie
I will certainly Integrate your build steps for ci/cd soon. In a couple of hours a lot of small changes will be pushed. After that I can test buildx.
Thank you for this great info
I have some trouble to setup buildx
on my Linux server, mainly cause if this. I use a custom network to manage all nft
rules manually.
I managed to create a multi-arch
wg-gen-web
Docker Image by following this blog post: https://www.docker.com/blog/multi-arch-images/Here are the steps:
docker buildx create --name wg-web-builder docker buildx use wg-web-builder docker buildx inspect --bootstrap docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t mxie/wg-gen-web:latest -f Dockerfile.dev --push .
As a result, the image is now pushed into my fork: https://hub.docker.com/repository/docker/mxie/wg-gen-web
I don't mean to maintain this fork for long term. Just want to show you how this can be done :)
Working well, i just tested it.
@vx3r BTW: First i must say im a rookie with docker, i try to run docker-compose but it will not run with your snippet. Something i miss??
It will work, just change the image from image: vx3r/wg-gen-web:latest
to image: mxie/wg-gen-web:latest
@SA7BNT This screenshot seems to be ok, it looks like you are attached to the docker, but no output log is generated after the attach.
Try running , to run in the background
docker-compose up -d
then to print the logs :
docker-compose logs wg-gen-web
(append -f for stream output like tail -f)
Aborting was done after about 2min. WTH am im doing wrong? OK E-Mail is not config but that can´t be the issue. Was testing with real mail config but same problem.@SA7BNT This screenshot seems to be ok, it looks like you are attached to the docker, but no output log is generated after the attach.
Try running , to run in the background
docker-compose up -d
then to print the logs :
docker-compose logs wg-gen-web
(append -f for stream output like tail -f)
Actually the container is running. How are you trying to access web interface ? See the difference between expose and port directives in docker compose.
With this configuration web interface is accessible at http://<container ip or fqdn>:8080
If you want to access the service with the host ip you need to change expose by:
ports:
- "8080:8080"
After this you can acces the web interface with http://<host ip or fqdn>:8080
@vx3r thanks, you made my day ;) that was the my problem :(
Now after i backup my wg0.conf i will try to import my clients. Or is that not able yet??
There is no import function yet. Short answer is no you can not import clients. The long answer is yes you can but it’s little tricky, basically you will have to edit manually all generated json files and put your existing keys..
I suggest to create new clients and download configuration from web interface.
I agree, LOL that will be the fastest way. Thanks for that great project.
@vx3r I understand you may have your CI/CD setup in gitlab to push images into Docker hub.
I've done a multi-arch dockerx build setup with GitHub Action in my fork. Feel free to take a look if you're interested in switching over: https://github.com/zmingxie/wg-gen-web/blob/master/.github/workflows/main.yml
@zmingxie thank you for your effort on this multi-arch build setup, this is great!
I added the github workflow, so the setup for now is:
- push on my gitlab, ci/cd triggered and the image with the tag
--tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
is pushed to docker hub - github is a mirror of my gitlab, pushed changes trigger the workflow and the multi-arch build with the
latest
tag is also pushed to docker hub
We have two images, one with normal docker build
with the commit hash tag and multi-arch build with the latest
tag.
Fill free to reopen the issue if you think that we can do better and thank you again :)