Docker Minecraft Host

I am trying to host Minecraft servers in docker containers on an ec2 instance, and point a different subdomain to each container, for example

a.example.com -> container 1

  • Setup secured Jenkins master with docker
  • how to setup dns nameserver in docker permanently in user-defined network?
  • AWS: docker container cannot connect to external website on SSL
  • Networking and DNS in Kubernetes local cluster with Docker
  • Is there a way to discover other containers on a docker network using DNS?
  • How can I connect my autoscaling group to my ecs cluster?
  • b.example.com -> container 2

    c.example.com -> container 3

    …and so on.

    If these containers were running a website, I could forward the traffic with Apache, or node-http-proxy, etc. But because these servers are running TCP services, I cannot route the traffic this way.

    Is this possible? And if so, how?

  • How to run and install Protractor E2E tests in Docker container for Laravel?
  • How to dockerize my play scala app?
  • Mac host doesn't like Docker container port forwarding
  • Error when building the blackbox_exporter Docker image
  • Does Docker USER source .bashrc before running commands?
  • Including data in MySQL Docker container
  • 2 Solutions collect form web for “Docker Minecraft Host”

    The Minecraft client has supported SRV DNS records for a while now (since 1.3.1 according to google). I suggest you assign your Docker containers a stable set of port mapping with the -p flag, and then create SRV records for each FQDN pointing to the same IP but different ports.

    Google gives several hits on the SRV entry format – this one is from the main MCF site: http://www.minecraftforum.net/topic/1922138-using-srv-records-to-hide-ports-on-your-server-ip/

    I have four MC servers running on the same physical host with a single IP address, each with a separate friendly entry for players to use in the Minecraft client, so none of my users need to remember a port. It did cause confusion for a couple of my more technical players when they had a connectivity issue, tested with dig/ping, then thought the DNS resolution was broken when there was no A record to be found. Overall, I think that’s a very small downside.

    Doesn’t HAProxy http://haproxy.1wt.eu/ route tcp traffic?

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.