vx3r / wg-gen-web

Simple Web based configuration generator for WireGuard

Home Page:https://wg-gen-web-demo.127-0-0-1.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exec user process caused "exec format error"

SA7BNT opened this issue · comments

Hallo,
am im right that this not can run on a Pi3+ (Buster) or am i missing something??
Bildschirmfoto 2020-02-04 um 10 27 05

Best Tim

commented

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 :)

commented

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

commented

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??

commented

It will work, just change the image from image: vx3r/wg-gen-web:latest to image: mxie/wg-gen-web:latest

image: mxie/wg-gen-web:latest

Done that but it will not running longer then
Bildschirmfoto 2020-02-05 um 08 58 29

commented

@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)

@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)

Bildschirmfoto 2020-02-05 um 09 49 37

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.
commented

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??

commented

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

commented

@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 :)