Closed ddribin closed 2 years ago
You probably want to use the macvlan driver instead see: https://github.com/jacobalberty/unifi-docker#bridge-networking
I don't have a write up on it but it does work well.
If switching to the macvlan driver is a bit much, another option to try would be to add the IP address to your run command, a lá:
sudo docker run --detach --restart always --init -p 192.168.1.43:8080:8080 -p 192.168.1.43:8443:8443 -p 192.168.1.43:3478:3478/udp $(etc)
However, you should be able to get by specifying it only for the 3478/udp and maybe 10001/udp mappings.
It looks like macvlan was added to version Docker v17.06, but Synology only ships with v17.05. I'll give the -p
with an IP address a try and report back.
So, after a bit more digging, while macvlan
is unavailable, it looks like I can use host
networking: https://docs.docker.com/network/host/
If you use the
host
network driver for a container, that container’s network stack is not isolated from the Docker host. For instance, if you run a container which binds to port 80 and you usehost
networking, the container’s application will be available on port 80 on the host’s IP address.
I can use this by passing --network host
to the docker run
command.
I just encountered this problem on docker 17.05.0-ce and can confirm that adding the IP to the -p
flags fixed it.
I had a similar problem when the controller is behind the Docker's 172
IP Address each time my controller was restarted.
I simply removed the 10001
UBNT Discovery port and made sure by manually informing each device again. Then I rebooted the controller once, and the problem went away.
My resolution: UBT Discovery doesn't work with the Docker's DHCP network unless set to host.
Hello, I have the same problem, but I use the GUI interface in DSM 6.2.3 In the Unifi Portal, I see - Host Address 172.17.0.5
Is there any way to fix this in the GUI implementation of Synology Docker?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
You probably want to use the macvlan driver instead see: https://github.com/jacobalberty/unifi-docker#bridge-networking
I don't have a write up on it but it does work well.
would you do a writeup about it? I can't use the hotspot manager because of the wrong URL generated
Host operating system
Synology
What tag are you using
beta
What complete docker command or docker-compose.yml do you use to launch the container (omitting sensitive values)?
sudo docker run --detach --restart always --init -p 8080:8080 -p 8443:8443 -p 3478:3478/udp -p 10001:10001/udp -e PKGURL=https://dl.ubnt.com/unifi/.../unifi_sysvinit_all.deb -e TZ='America/Chicago' -e RUNAS_UID0=false --volume /volume1/docker/unifi-beta:/unifi --name unifi-beta jacobalberty/unifi:beta
What do you expect to happen?
The docker container is running on a private
17.x.x.x
IP address. This means the UniFi devices cannot connect to it directly. This is expected and what the port forwarding is supposed to fix. But the UniFi controller uses its own IP address for the Inform and STUN IP addresses. I am able to override the Inform IP address to be the host's192.x.x.x
IP in the UniFi controller. I would expect the STUN IP address to be the same.What actually happens?
The STUN IP address is still the
17.x.x.x
address:This is a log from the UniFi controller:
The STUN IP is 172.17.0.1, but I'd like it to be the same as the Inform IP, 192.168.1.205.