Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix][Feature Request] Add support for docker networking hostnames #103

Open
Letgamer opened this issue Oct 5, 2024 · 0 comments
Open

Comments

@Letgamer
Copy link

Letgamer commented Oct 5, 2024

At the moment it is not possible to update the tunnel config to point to a docker hostname.

Assume the following docker-compose.yaml:

services:
  crafty:
    image: registry.gitlab.com/crafty-controller/crafty-4:latest
    container_name: crafty
    restart: always
    networks:
      - crafty
  playit:
    container_name: playit
    image: ghcr.io/playit-cloud/playit-agent:latest
    restart: always
    environment:
      SECRET_KEY: "${SECRET_KEY}"
    networks:
      - crafty
networks:
  crafty:

To get this to work in you have to set the tunnel to Local Address: crafty and Local Port: 25565
But it is not possible to set the Local Address as a hostname, only IPs are possible

Workaround:

services:
  crafty:
    image: registry.gitlab.com/crafty-controller/crafty-4:latest
    container_name: crafty
    restart: always
    networks:
      crafty:
        ipv4_address: '10.1.0.100'
  playit:
    container_name: playit
    image: ghcr.io/playit-cloud/playit-agent:latest
    restart: always
    environment:
      SECRET_KEY: "${SECRET_KEY}"
    networks:
      - crafty
networks:
  crafty:
    driver: bridge
    ipam:
      config:
        - subnet: 10.1.0.0/16

By giving the container a 'static' IP it is possible to setup the Tunnel via the IP
But this requires more configuration and doesn't look clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant