Closed floer32 closed 9 years ago
The end goal for me: use boot2docker
with --net=host
so that all containers are accessible at $( boot2docker ip ):<container_specific_port>
. It's not that I'm hell-bent on running it this way, I just can't see another way to run all containers and access each container from outside of the Docker host VM ... so far I can only see SSHing into the boot2docker VM to access the various internal IPs.
@hangtwenty You access the ports exposed from the containers via the Docker host. You can either let Docker map a port dynamically (docker run -P ....
) or you manually specify the ports (docker run -p [host_port]:[docker_exposed_port] ...
).
Ah thank you for answering @cgswong, you are right! It seems this is the way ...
https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md#port-forwarding
Thanks for taking the time to address my issue.
It seems to me that you can't do a good run of this using
boot2docker
, not without digging for Tomcat configuration files. The containers run on different internal IPs, and several things use port 8080. So, you can't expose all these services to the host machine (the machine hosting theboot2docker
VM). Am I missing something?