Connect local Docker container to Wireguard

I followed the steps here to set-up a local Wireguard connection on my Mac. I can confirm that running dig +short txt _apps.internal @fdaa:0:455a::3 does indeed work (and have run some other commands).

I’m now attempting to connect to the Wireguard network in a local Docker container running via Docker for Mac. How can I do that?

Use cases:

  • Debugging fly-log-shipper locally
  • Running migrations securely from a local container
1 Like

I am having this same issue. At one point in time, it was working but it has not lately.

You’ll need to make sure Docker is setup to use IPv6, at the very least. The simplest way to test this is to run a one off image and try pinging. Something like:

docker run --rm -ti wbitt/network-multitool /bin/bash

Then ping one of the Fly.io IPv6 addresses you have access to over wireguard. They should all response.