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

I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
482
  • Question
Open an issue on that GitHub page. The developers will be glad to assist. OP has posted two threads on...
Replies
5
Views
1,072
I'm happy with email notifications but in v0.3.3 of dockcheck the author added apprise notifications...
Replies
4
Views
1,196
Looks like I triggered you somehow with my post: it was not my intention. I have no idea whether bash or...
Replies
4
Views
1,674
I have no idea what you are doing, but I just tested it based on the instructions of the guide you linked...
Replies
11
Views
2,760
True! Still, there are certain containers that can be run on those machines as long as users are aware of...
Replies
8
Views
4,729
Who's this 'support' you're talking about? Did you miss the 'unoffical' bit in this? Or the 'NAS owners'...
Replies
9
Views
3,143

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Trending threads

Back
Top