Defining extra hosts for Docker deployments
Extra hosts for Docker deployments can be defined when there are network or DNS issues. Defining extra hosts is optional and not a requirement to ensure the connections are successful.
In some cases on CentOS 8, the host names fail to resolve properly. If the DNS is unreliable in resolving host names to IP addresses, these can be defined manually in the configuration. The following steps work for all supported Linux versions.
Note: When modifying the yml
file, the indentations use spaces to indent the text. Do not use tabs. The entries within the file must line up exactly.
Use the networks:
placement as a reference for extra_hosts:
and the sametime.test:
placement as a reference for where the -
is placed.
-
Open the docker-compose.yml file in edit mode.
-
The following components require a connection to the MongoDB server. Locate and update each section with the MongoDB host name and IP address.
- community
- recordings
- files
- click2call
- location
- catalog
- app-registry
- activity
- backgrounds
- lobby
After
networks
add anextra_hosts
statement, where mongoDB_host is the fully qualified hostname of the MongoDB server and mongoDB_IP_address is the IP address of the MongoDB server.
extra_hosts: - mongoDB\_host: mongoDB\_IP\_address
For example:
-
The community component requires a connection to the LDAP server. Locate and update this section with the LDAP host name and IP address.
After
networks
add anextra_hosts
statement, where ldap_hostname is the fully qualified host name of the LDAP server and ldap_ip_address is the IP address of the LDAP server.extra_hosts: - ldap.host: ldap\_ip\_address
For example:
-
The jvb component requires a connection to the STUN servers. In the
jvb
section, add anextra_hosts
section an include a statement for each STUN server, where stun_host_name is the fully qualified host name of the STUN server, and stun_ip_address is the IP address of the STUN server.- stun\_host\_name:stun\_ip\_address
For example:
extra_hosts: - stun_host_name:stun_ip_address - stun1_host_name:stun1_ip_address - stun2_host_name:stun2_ip_address
Resolve the host names of the STUN servers and use the corresponding IP address for your region. In the following graphic, the Google STUN servers are used with the regional resolved IP addresses.
-
-
Verify that the formatting is correct. Correct any indentations using spaces.
-
Save the changes.
-
Run the following commands to apply the changes.
docker-compose down
docker-compose up -d
Parent Topic: Installing Sametime in a Docker or Podman environment