How to set a docker container's iP?
Asked Answered
H

1

2

Can somebody tell me how to set a container's ip to a specific one ? I dont want to set the bridge to set of ips. All the results i get in net is to set range of ips to the docker bridge.

Herakleion answered 25/3, 2014 at 17:16 Comment(0)
R
3

You can use an existing IP of the host like so:

docker run -p 127.0.0.1:80:80 image etc.
Refined answered 25/3, 2014 at 17:33 Comment(1)
always funny, that a new user cannot accept or vote on an answer :) You're welcome anywayRefined

© 2022 - 2024 — McMap. All rights reserved.