Solved Docker container fix IP ?

Currently reading
Solved Docker container fix IP ?

12
1
NAS
Synology DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Hi,
quick question :

I've linked a Firefly-docker with a MariaDB-docker using docker internal network (172.17.0.X). However each time I restart the NAS, the containers become different IPs and I have to manually change them in the environment variables. I know there is a possibility with bridges but I don't really understand how to set them up.

Would someone be kind enough to help me ? :)
Thanks in advance
 

fredbert

Moderator
NAS Support
Subscriber
4,076
1,616
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
  3. RT6600ax
Operating system
  1. macOS
Mobile operating system
  1. iOS
When I set up FreshRSS with PostgreSQL I used a link in the FreshRSS configuration that provided and alias to the PostgreSQL container. The alias is used by FreshRSS to refer to whatever IP is currently assigned to PostgreSQL.

See sections 'Add the FreshRSS container to Docker' and 'Configuring FreshRSS' for how the link is setup and used. Probably similar for you?
 
12
1
NAS
Synology DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Thank you for your answer, fredbert.

But doesn't that require a specific formulation dependent on the client container (FreshRSS in your case) ? I don't see anything similar for Firefly.
 

fredbert

Moderator
NAS Support
Subscriber
4,076
1,616
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
  3. RT6600ax
Operating system
  1. macOS
Mobile operating system
  1. iOS
AFAIK the link adds an entry to /etc/hosts that gets updated by Docker so that the current linked container's IP is associated with the alias.

If I issue the command ping rss_psql_server from within a FreshRSS console then it will resolve to the current IP and ping it.

Edit: Adding a link is one of the tabs in Synology Docker's Edit window, or in the Advanced settings when creating a new container.
 
12
1
NAS
Synology DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Ahhh I understand.
I made a link with mariadb from firefly-docker, used that alias as IP in the environment variables and it worked ! Now I will test it with a restart.
Thanks a lot for your help
 
12
1
NAS
Synology DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Thank you Shadow.

The bridge solution was however enough for my problem :)
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
Sure, thanks for the tip, apparently it can workaround the Web Station bug although I wonder how this...
Replies
6
Views
545
  • Question
There is a way, but its high likely you won't like it :D It will require you to manage those containers...
Replies
1
Views
548
  • Question
Hi, Thanks for sharing. Hope this will work. Best regards
Replies
2
Views
1,708
I was trying to set up ntopng but the strangest thing happened, as I am not able to get an IP address. Is...
Replies
10
Views
3,378
  • Question
One-eyed-king, thank you very much for the answer. I have attached screenshots of the Syno GUI settings...
Replies
2
Views
984
  • Solved
All setup now and working great, thanks again for your help (y)
Replies
3
Views
1,484
🍪 🍺 🍪 🍺 🍪 🍺 Major embarrassment... I should have caught this from @Rusty 's comment. In my docker...
Replies
10
Views
3,123

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top