vmware / vmware/photon

Container with custom IP

Open
#799 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.2k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

I created a new docker network.
docker network create -d macvlan --subnet=172.16.0.0/16 --gateway=172.16.0.1 -o macvlan_mode=bridge -o parent=eth0 macvlan

Now I wanted to start a nginx container with a custom IP.
docker run --name some-nginx2 --net macvlan --ip 172.16.4.12 -d -p 8080:80 nginx

I am not able to reach the webserver over the ip-address. When I start the nginx container without a custom network and ip-address I can reach the webserver with the IP of the photonOS host.

My idea was to run several nginx container on the photonOS with custom IPs.

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

No project file or test is identified. Start by reproducing the reported docker network create and docker run commands on a PhotonOS host, then compare reachability for the macvlan container and the default-network container; done would require identifying and documenting the cause or a confirmed fix for the custom-IP access problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx
Domain
devops, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.