Overriding Realm Server Port Defaults in Docker

To correctly override the default realm server ports, complete this task.

It is good practice to use the default realm server ports when running the realm server in a Docker container. Nonetheless, in some situations you might need to use non-default ports: for example, during testing.

Dockerfile.tibrealmserver determines these default port numbers for the realm server in the Docker image:
  • 13131 - Connect port (-ht)
  • 13134 - Client port (-f)

You can override these defaults at runtime, or you can build Docker images that use non-default port numbers.

To override these default ports at runtime, you must satisfy all of these requirements:
  • Explicitly override both ports with command line arguments. Overriding a subset of the ports is not sufficient.
  • Specify ports as *:port. You must specify * rather than a specific host.
  • Expose the override ports using Docker's -p parameter. The host ports and container ports must be identical.

Procedure

  • Start the realm server container using a command line that meets all three requirements. For example:
    docker run -d -p 5551:5551 -p 5553:5553 ftl-tibrealmserver -ht '*:5551' -f '*:5553'