EmbarkStudios / wg-ui

WireGuard Web UI for self-serve client configurations, with optional auth.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'no such file or directory' error when using docker image

lxz81 opened this issue · comments

commented

Describe the bug
When I use the latest docker image, I get the following error:
standard_init_linux.go:219: exec user process caused: no such file or directory

To Reproduce
Steps to reproduce the behavior:

  1. I added the following to my docker-compose.yml:
  wireguard-ui:
    image: embarkstudios/wireguard-ui:latest
    container_name: wireguard-ui
    privileged: true
    network_mode: "host"
    ports:
      - 25444:25444
      - 51820:51820/udp
    volumes:
      - /opt/wireguard-ui:/data
    environment:
      - PGID=1000
      - PUID=1000
      - WIREGUARD_UI_LISTEN_ADDRESS=:25444
      - WIREGUARD_UI_LOG_LEVEL=debug
      - WIREGUARD_UI_DATA_DIR=/data
      - WIREGUARD_UI_WG_ENDPOINT=vpn.somehost.com:51820
      - WIREGUARD_UI_CLIENT_IP_RANGE=10.8.0.1/24
      - WIREGUARD_UI_WG_DNS=94.140.14.14
 #     - WIREGUARD_UI_NAT=true
 #     - WIREGUARD_UI_NAT_DEVICE=eno1
    restart: always

  1. run docker-compose up wireguard-ui

Expected behavior
wg-ui to be running

Actual behavior
The following error:
standard_init_linux.go:219: exec user process caused: no such file or directory

same issue here

Same issue here when trying to run the command provided in the README:

OS: Ubuntu 20.04.2 LTS "Focal"
Architecture: amd64 x86_64
Docker version: 20.10.6, build 370c289

Error message: standard_init_linux.go:228: exec user process caused: no such file or directory

Turns out, Alpine doesn't have any of the libc6 binaries required to run the go wg-ui binary. This should probably be added to the official Dockerfile's in this repository, but a quick fix would be to create a Dockerfile with:

FROM embarkstudios/wireguard-ui

RUN apk add --no-cache libc6-compat

And then tell your docker-compose to build the image off that Dockerfile:

version: "3"
services:
  wireguard-ui:
    build:
      context: .
    restart: always
    privileged: true
    network_mode: host
    environment:
      - WIREGUARD_UI_LOG_LEVEL=debug
      - WIREGUARD_UI_DATA_DIR=/data
      - WIREGUARD_UI_WG_ENDPOINT=vpn.mydomain.com:51820
      - WIREGUARD_UI_WG_DNS=10.0.0.1
      - WIREGUARD_UI_CLIENT_IP_RANGE=10.10.0.1/24
      - WIREGUARD_UI_NAT_DEVICE=eth0
      - WIREGUARD_UI_LISTEN_ADDRESS=:8080
    volumes:
      - /opt/wireguard-ui:/data

Worked for me.

Any suggestions on how to make this work in Ubuntu 20.04? I have tried:

  • Downgrading libc6 from 2.31-0ubuntu9.3 to 2.31-0ubuntu9.2 and installing libc6-dev
  • Installing build-essential
  • Using snap to install golang
  • Adding in the above strings to the Dockerfile

@twilight7345 Strange — I have it running on Ubuntu 20.04.

Forgot to write here I noticed. I added the libc6-dev package to the main docker file earlier in #131 by the finding from @enriquecaballero

This should solve the problem and latest should work now.

Unfortunately, I still get this error on ARM with the latest image:

REPOSITORY                           TAG       IMAGE ID       CREATED       SIZE
embarkstudios/wireguard-ui           latest    26760c5b0c91   2 days ago    14.1MB
commented

It still isn't fixed here either (when using the -latest image).

If I use the modifier Dockerfile from github however, it does work. Looks like the pre-build docker image is not updated or something

@lxz81 Sorry if this is a dumb question, but how did you use the modified Dockerfile? I retested this issue on clean installations of both Ubuntu 20.04 and Debian 10 and it is still duplicating.

commented

Hi @twilight7345
I did the same as #128 (comment)

So I changed the Dockerfile from this repo to https://paste.ofcode.org/32Ey2qWE2JMBM7FHzJRhMxQ
After that, i ran
docker-compose build wireguard-ui
and
docker-compose up -d wireguard-ui

i'm still facing this issue on latest pull from dockerhub

Could you try running with the dockerfile provided in this branch: https://github.com/EmbarkStudios/wg-ui/tree/suom1/distroless-test

That's a revert to using distroless again instead of alpine.

@suom1 I'm trying to run this on an openwrt system and it doesn't have enough space to build from a dockerfile.
As another user mentioned, the new dockerfile looks to be working so you might want to push the change to dockerhub.
I tried the simpler dockerfile below but that didn't run either.

FROM embarkstudios/wireguard-ui
RUN apk add --no-cache libc6-compat

The change you mention is already pushed to dockerhub! It was done here: https://github.com/EmbarkStudios/wg-ui/pull/131/files

In that case, I will try to run the distroless dockerfile on my linux VM. Will report back.

I'm still getting the error with embarkstudios/wireguard-ui:latest.

embarkstudios/wireguard-ui:debug (Ubuntu-based) and distroless work fine.

In that case, I will merge distroless back in! Thank you for testing.