subspace: `wg`: not found

The wg binary cannot be found inside the docker container. Although the volume mount is specified in my docker run command. I also tried it via the example docker-compose variant, no luck.

I double checked locally, wg is installed at /usr/bin/wg and its not a symlink somewhere.

I’m at my whits end why in the entrypoint.sh:139, while running, it can’t find the wg binary.

Any idea whats going on here?

  • Ubuntu 18.04 Server x64
  • Docker 19.03.8

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 20

Most upvoted comments

Please consider tagging releases before pushing them to docker hub. 😦

I have the same issue, running on Ubuntu 20.04.

@gavinelder probably already solved this, but I want to provide more info - it looks like the problem is that the wg binary is linked against a different libc than what is in the alpine-based container of Subspace (or just at a different path). When you mount it into the container, the Linux linker can’t find the libc binary - which is what the not found error is about.

My workaround was to also mount the host’s libc into where the host wg expects to find it, by adding the following options to the docker command line:

    --volume /lib/x86_64-linux-gnu/libc.so.6:/lib/x86_64-linux-gnu/libc.so.6:ro \
    --volume /lib64/ld-linux-x86-64.so.2:/lib64/ld-linux-x86-64.so.2:ro \

Hi this PR has now landed

Going to keep this issue open for another couple of days for any uses,

#75 Related PR for those interested

@bobbyiliev need to have the PR reviewed first currently blocked on that.

@jedieaston

I have been doing the following.

git clone https://github.com/subspacecommunity/subspace.git
cd subspace 
git checkout un-break
rm -rf /data/*
sudo docker build . -t subspace:test
sudo docker stop subspace
sudo docker rm subspace
sudo docker create docker create \
    --name subspace \
    --restart always \
    --network host \
    --cap-add NET_ADMIN \
    --volume /data:/data \
    --env SUBSPACE_HTTP_HOST="subspace.example.com" \
    --env SUBSPACE_NAMESERVER="1.1.1.1" \
    --env SUBSPACE_LISTENPORT="51820" \
    --env SUBSPACE_IPV4_POOL="10.99.97.0/24" \
    --env SUBSPACE_IPV4_GW="10.99.97.1" \
    subspace:test
sudo docker start subspace
sudo docker logs subspace

No worriers @gavinelder, thats what we’re here for - to work out the kinks. If we expected everything to function flawlessly I wouldn’t be trying a community project on github 😉

LMTAL I think this may be a pathing issue on Alpine.