Container with custom IP
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
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.
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