Anyone able to help me get the docker container that is running in the HDP 2.5 sandbox to connect directly to my lan?
My google-fu says I either need to run the sandbox container in host network mode, or perhaps expose more ports?
My issue is that the sandbox is using a non-routable ip, thus I cannot reach it from a remote client.
Any help would be appreciated!
Are you using the native Docker sandbox or the VirtualBox/VMWare sandbox? By default, the VirtualBox VM is using NAT based networking. Yes, that does mean the VM IP address is not externally accessible from a host other than the machine where the VM is running. However, the VM is using port forwarding. By default it is using the IP 127.0.0.1. If you change the host IP to your host IP address, then you should be able to access the VM from outside of your local host.
If you change the adapter to Bridged, the VM will get an IP address on the same network as your workstation and other hosts. This should make the sandbox addressable. Since the VM is mapping ports to the Docker container inside of it, you should be able to access the docker container externally by using the address the VM gets when it comes up.
i am using the vmware install, and while some components of the docker container are indeed accessible, I need the docker container to own an IP on the lan rather than rely on forwarding. I think I will just go straight docker container rather than having it run behind the vmware host....unless there is an easy way to re-jig this....
I personally think running the native/straight Docker container may be easier for you. I've personally started using that version of the sandbox more often.
The short info is this: you can't change change the Docker ports after the container has been created. However, adding ports is as simple as adding another
-p switch to the
docker run command.
Keep in mind though, you need to remove the existing container to add ports to it since it cannot be done to existing containers unfortunately.
That is correct. You have to run
docker rm <image name> to remove the existing container. Then you can run the
docker run ... command with the additional
-p ports added.