bubuntux / nordlynx

GNU General Public License v3.0
204 stars 43 forks source link

Add the INTERFACE env var to allow specifying the interface to use in the container #100

Closed tanty closed 2 years ago

tanty commented 2 years ago

This enables using the container with rootless podman.

rootless podman uses slirp4netns which provides the "tap0" interface in the container, while not having acces to the "eth0" interface.

You can test this, running with rootless podman, like:

$ podman run -d \
  --cap-add=NET_ADMIN #required \
  --cap-add=NET_RAW #required \
  -e PRIVATE_KEY=xxxxxxxxx #required \
  -e INTERFACE=tap0  \
  docker.io/tanty/nordlynx:rootless-podman
bubuntux commented 2 years ago

thanks for the contribution