moby / moby/hyperkit

Exposing hyperkit ip address for network=host setting

Open
#280 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.7k
Forks
336
PR merge metrics
No merged PRs in 30d

Description

docker engine version: 19.03.8
docker desktop version: 2.2.0.4
hyperkit version: v0.20190802-4-g97f091

I am trying to run several containers inside of aws fargate task for an application I'm developing. All containers using the fargate service share a network interface, so to replicate this configuration locally I'm trying to use a docker-compose file where my containers are set to use the network=host option.

The containers are able to run as expected but I am not able to access any of the network services they provide. I'm guessing this is because they are sharing a network namespace with the docker engine's hyperkit vm rather than one with my mac computer.

I believe I can query for the hyperkit vm ip with the following command $ docker run --network host alpine ifconfig eth0. However, I still can't access the services using ports against this ip nor can I reach it using the ping command. Is there any way expose this ip when using network=host mode?

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported setup with Docker Compose using network=host, then run docker run --network host alpine ifconfig eth0 as described. Trace how HyperKit and Docker Desktop expose networking for host-mode containers; done means the relevant VM address and its container services are reachable from the Mac.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.