In order to access your Docker container from outside a Platform (i.e. from the Internet), Jelastic offers the following solutions:
1. If your service or application, that is running within Docker container, listens to the 80th port, then it will be automatically exposed to external network (over the assigned domain name) via Jelastic Shared Load Balancer.
In such a case, you just need to click Open in browser for the corresponding node to launch it (this option works for HTTP connections).
Note: In case your Docker container does not have an external IP attached, Jelastic performs an automatic port redirect. This means that if application listens to a custom port on TCP level, Jelastic will try to automatically detect it and forward all the incoming requests to this port number. As a result, in most cases, your dockerized app or service will become available over the Internet under the corresponding node’s domain right after creation.
However, in case you’d like to prohibit such a possibility, you may declare the corresponding rules within your container’s firewall settings
2. For more complex implementations, Jelastic provides special endpoints functionality (available within the same-named section of any environment’s Settings):
It allows to expose the required private port on your container through the randomly chosen public port at Jelastic Shared Load Balancer, so it can be accessed via the provided Access URL.
3. And the last option, which gives the maximum freedom (allowing, for example, to secure your connection with Custom SSL, get rid of limitation on the simultaneous connections amount, etc.) is attachment of Public IP address to your Docker container.
By its means, your app can be configured to listen to any port you need and, in such a way, to become accessible via the external network.
Note: Public IP option is a paid add-on. The exact cost for its usage can be seen upon hovering over the price widget at the right part of your topology wizard or through navigating to Quotas & Pricing > Pricing > Options tab.
That’s all! Now you can leverage the most suitable connection option among the described ones while working with your Docker containers.
If you face any issues while setting connection to your Docker container at Jelastic, feel free to appeal for our technical experts’ assistance at Stackoverflow