Errors should give more context
simulot opened this issue · comments
Describe the bug
I'm trying to run the docker image in my docker stack, wireguard itself is running as a docker image. It's the wireguard-go because of difficulties to get the kernel module running on my rig.
To Reproduce
I have includes this image as docker-compose service like following:
wireguard-ui:
image: embarkstudios/wireguard-ui:latest
container_name: wireguard-ui
entrypoint: "/wireguard-ui"
privileged: true
command:
- --log-level=debug
volumes:
- "/tank2/docker_data/wireguard/config:/etc/wireguard"
- "./wireguard-ui:/data"
ports:
- "8081:8080"
- "5555:5555"
labels:
- "traefik.enable=false"
When I start the container, I get level=fatal msg="operation not supported"
which is not informative
Expected behavior
I'd expect more context on the error as it is now common with golang using error wrapping to get something like "Configuration file creation: operation not supported".
I'm quite sure the problem is in my config, but without context, it's hard to troubleshot it.
Screenshots
Not applicable
Device:
- OS: debian 10 / docker
Additional context
Thanks.
Simulot
The Wireguard device created by wireguard-go existed in the default network namespace. Execute "ip a" will print all network interface, it will be wg0
usually. wireguard-ui will can not operates it in an isolated network namespace in the container.
You can try to set the container's network to host mode. You may need to add network_mode: "host"
in your docker compose file or --net=host
in your docker run command.
Or wireguard-ui maybe could manage a userspace Wireguard in its container.
I gave up with dokerized wireguard-go on my NAS a while ago. I have placed wireguard on another device using kernel module.
So I can't test the solution any more.
Thanks you for your help.
++ Simulot