Solved Docker container fix IP ?

Currently reading
Solved Docker container fix IP ?

13
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
 
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?
 
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.
 
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.
 
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
 
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

True! Still, there are certain containers that can be run on those machines as long as users are aware of...
Replies
8
Views
786
+1 to Rusty's recommendation avoiding using DSM except for NAS administration. I use Dashy for my docker...
Replies
6
Views
869
I heard back from Synology support, this functionality is not available. The support rep has filled a...
Replies
3
Views
1,287
done. everything works as expected. Thanks for help @Rusty and @Telos
Replies
6
Views
629
I've done the MACVLAN setup with Portainer/Docker, so I get the gist of what you are saying, there is...
Replies
6
Views
1,644
  • Question
Sure, thanks for the tip, apparently it can workaround the Web Station bug although I wonder how this...
Replies
6
Views
4,912
  • 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
1,353

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Back
Top