Connect to Custom Container
This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.
Click or tap a screenshot to view it at its original size.
Objective
This guide explains how to use Connect to Custom Container on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.
Before you begin
- Sign in with an account permitted to manage the relevant environment.
- Confirm the target environment, region and resources before saving changes.
- Create a backup or rollback plan before changing a production system.
Container integration with Ruk-Com Cloud PaaS is one of the most important and demanded services offered as a platform. The convenient integration of containers combined with Ruk-Com Cloud's flexible management appeals to developers and allows hosts to easily maintain any type of application available in Docker templates.
This article discusses the key working principles of Docker applications, which may be of interest to both beginners and developers.

In this section below It will be an in-depth look at how to connect containers to the Ruk-Com Cloud, looking at both internal and external possibilities and the basic container information needed to establish a container connection.
Method:
- Internal Connection- Setting up connections within the container
- External Connection- Internal connections to access external containers
Internal Connection
Each Ruk-Com Cloud container automatically receives a unique internal domain name and internal IP address immediately after the container is created. Those parameters can also be used to access the container. Within the scope of the same cloud (e.g. creating interconnections through networks within the platform)
1. The first option you'll want to consider when setting up connectivity between containers is a function.linkEmbedded, which allows connecting containers from different layers within the same environment for secure migration. Data variables from the Docker image are sent to the recipient without publishing any ports outside.
To do this, you simply select the desired layer and specify the alias for the connection (while all appropriate variables have a prefix specified):

After that you can refer to the section.Variablesof separate container settings and adjustments as needed However, changes to environment variable values for containers that are already linked to other containers and are used are automatically updated.
In cases where you want to create other types of internal connections (for example, if you want to manually modify them via configuration files) need to know the exact domain name or IP of the container and be accessible over the network within the platform.
Appropriate information can be obtained in 2 ways:
- via email notificationThat you get after creating the environment, the internal domain name is listed in the Container Administrator's information section:

- Via Ruk-Com Cloud DashboardThe same information can be found in the following ways:
- Click the buttonOpen in Browsernext to the container by selecting the node you want to open in a new browser tab. So you can easily copy the domain from the address bar.
- The node's IP address can be found from the Node ID for the desired container, as shown in the image below.


External Connection
In order to access your containers from external platforms (e.g. from the Internet), Ruk-Com Cloud offers the following solutions:
1. If your service or application is running in a container that listens to port80It will be automatically revealed to external networks. (via designated domain name) via Ruk-Com CloudShared Load Balancer

Note:In case your container does not have an external IP attached, Ruk-Com Cloud will automatically redirect the port. This means that if an application listens on a TCP level custom port Ruk-Com Cloud will try to automatically detect and direct all incoming requests to this port number. As a result, most services or applications will be available on the Internet. under the domain of the corresponding node immediately after creation
However, in case you want to prevent such possibility. You can post the relevant rules atfirewall settingsin your container
2. For more complex operations, Ruk-Com Cloud provides special endpoint functions.endpoints (Available for sections with the same name of each setting. environment):

It allows opening any private ports you want on the container through random public ports that the Ruk-Com Cloud Shared Load Balancer can access viaAccess URL
3. The last option that gives the most freedom is to attach the address ofpublic IPto the container (e.g., securing the connectionSet SSLitself and limiting the number of simultaneous connections, etc.)

In such a way Your application can be configured to listen on any port you want in such a way for access over external networks.
Note:Public IP is a paid option. You can view the cost by hovering your mouse over the price box in the right hand section of the topology wizard or clickingQuotas & Pricing> Pricing > Options tab
Now you can take advantage of the most suitable connection options. From the options described above while working with Docker containers.
If you encounter problems while setting up a connection to a container at Ruk-Com Cloud, you can get help from our technical experts at Stackoverflow