mayswind / AriaNg

AriaNg, a modern web frontend making aria2 easier to use.
http://ariang.mayswind.net
MIT License
11.9k stars 1.3k forks source link

Connect over docker network #718

Open SplinterHead opened 1 year ago

SplinterHead commented 1 year ago

I'm trying to connect AriaNG to Aria2 over an isolated Docker netwotk (no ports exposed to the host). I'm struggling to get it to connect, is there any reason to expect the ports are to be exposed?

Docker compose sample:

services:
  aria2:
    image: <self-built aria2 image>
    container_name: aria2
    networks:
      - aria
    ...
  aria-ng:
    image: <self-built ariang image>
    container_name: ariang
    networks:
      - public
      - aria
    ...

networks:
  public:
    external: true # Ingress from public internet via reverse proxy
  aria:
    external: true # Isolated network for communication between these two containers
Checker8763 commented 1 month ago

You need to expose to port of the container of aria2 (expose 6800 in dockerfile).

Or configure exposing the default port in the docker compose file.

With exposing I don't mean binding it to a host port but just the docker directive.

If you don't expose a port the whole container is essentialy sealed off with no port open for other containers to connect to.

And what network driver are you using for the aria network?

If you chose a truely isolate network with driver none then they obviously can't connect either.