The fourth tab (Ports) provides you with the general information on managing Docker container’s ports at Jelastic:

According to it, you can bind the necessary port directly to the IP address (regardless whether it is internal or external) your container was provisioned with. Pay attention that there is no need to expose ports in Jelastic because it uses PCS container-based virtualization, which is more technologically advanced compared with the native Docker containers’ implementation: it has the built-in support of the natural virtual host-routed network adapters.

So, if you’d like the required port to be accessible from the outside, you can either map via endpoint at Jelastic Shared LB (for been reachable over the automatically generated URL) or attach the external IP address to the appropriate container. After that, depending on the way chosen, just bind your service (app listener) to the received internal or external address.

Note that starting with Jelastic 4.0 version, platform automatically detects the ports, that are listened by application on the TCP level, during an image deployment. Then it separates the ones, that are commonly used by standard services (e.g. SSH, mail, databases, etc) and adds the required redirect to the iptables rules list (forwarding all the requests to the remained port, or the first one within the list). Such an operation is performed on each container's launch, so that the corresponding application becomes available over the embedded Shared Load-Balancer just after being deployed, without any manual interventions required.

However, in case you need to disable this functionality (e.g. for the app’s admin panel to be unaccessible from the outside), from Jelastic 4.6 you are able to set up the required auto-redirect settings manually right during the Docker container creation. For that, switch to the Variables configuration section and add the dedicated JELASTIC_EXPOSE parameter with the following values as possible:
  • 0 or DISABLED or FALSE - to disable auto-redirect
  • a number within the 1-65535 range - to define the required port for setting the corresponding redirect
  • if any other value is stated, the auto-redirect functionality will work as usual