Consider adopting chipmk/docker-mac-net-connect strategy to provide host to container access
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, macos
- Domain
- networking
Research direction
The issue names no repository files or tests. Start by reading the linked Docker Desktop for Mac networking documentation and the chipmk/docker-mac-net-connect strategy, then determine whether this approach fits vpnkit; done means producing a concrete adoption plan or a well-scoped proposal for review.
Written by the indexing model from the issue text.
Description
Hey!
Over a course of few last years I've quite often run into a lot of inconveniences caused by lack of host to container access on macOS (compared to linux where you can ping container ip address right away). Usually it is a problems in a setups where some services of a distributed app run on host and some in a containers, so service should know whether it is running on host on in container to select a proper addresses (direct ones or localhost ones).
There are few crutches/workarounds with different level of invasiveness:
- use
docker.host.internalaccess between containers and put127.0.0.1 docker.host.internalinto/etc/hostson a host. That gives uniform connectivity but requires you to edit/etc/hosts. - keep two set adresses (internal and public) and select between them based on some env variable like
INSIDE_DOCKER=true - use internal addresses and manually set up ip aliases and pf routing rules on a host system. That work well with static containers but won't work when your app can dynamically create a container.
- use vpn into one of the containers and route traffic through it. That solves all of the problems but requires extra containers and services.
Recently @petuhovskiy brought to my attention https://github.com/chipmk/docker-mac-net-connect That is wireguard-based solution that tunnels traffic from tun interface on the host to the docker vm wireguard. Also it has a service to listen for a docker events to automatically manage routing table on a host.
Any possibility to adopt that approach in a docker for mac? Any possibility that PR on that matter will be reviewed and potentially merged? It seems to be minimalist and robust, without any new services (if merged). So far docker mac networking page (https://docs.docker.com/desktop/mac/networking/) states right away that Docker Desktop for Mac can’t route traffic to containers. and such approach can solve that problem in a nice way.
cc @stephen-turner @gregnr @djs55
- Dominant language
- OCaml
- Stars
- 1.2k
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from moby/vpnkit
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
kind/bug Ubuntu 24
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/kubespray#13532 ·
-
language/en needs-triage sig/network
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
kubernetes/website#57642 · 1 comment ·
-
app.loanspq.com OpenN: AdGuard DNS P3: Medium T: Incorrect Blocking
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AdguardTeam/AdguardFilters#242018 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
daeuniverse/dae#1116 · 1 comment ·