-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow extending dnsmasq by providing custom configuration. #162
Conversation
Kudos, SonarCloud Quality Gate passed! |
This is a very welcome change ! We have that use case also. This simple change would make subspace configuration very flexible. |
Hey @ThisIsQasim Thanks for the pr and sorry for the long silence. Then I think it would make it clearer for the user. Your pr is well written but the end user won't see it. |
Kudos, SonarCloud Quality Gate passed! |
Hi @gchamon, No need for the apologies. |
@ThisIsQasim the readme overall, in my opinion (I don't speak here for the rest of the maintainers) needs some rework. This is enough to point to the fact that this config is supported like this. I didn't have time to test it just yet, but seeing what kind of changes it introduces, the only concern would be for dnsmasq to fail with an edge case of an empty/invalid file or a file without the correct permissions. This I will test later. |
Sounds great. Hit me up if you want me to change something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested in my machine, awsome addtion! In one of my setups I was running a pi-hole just to have an easy option to serve a couple of custom domains, though the vpn instead of the public IP.
Many thanks! I'll wait for @gchamon to test this and the we can merge it once he reviews the changes.
Yup that is exactly what my use-case was.
Happy to be of help and thank you for maintaining this awesome project! |
@agonbar approved |
@all-contributors please add @ThisIsQasim for code |
I've put up a pull request to add @ThisIsQasim! 🎉 |
cc: @subspacecommunity/subspace-maintainers
Background
Reason for the change
dnsmasq can be used for accomplish a wide variety of tasks. This change lets us mount dnsmasq configurations inside the subspace container to provide additional configuration to dnsmasq.
For example you could override hostnames by creating the following config file and then mounting it inside subspace.
/opt/docker/dnsmasq/01-static-dns.conf
docker-compose.yml
Changes
/etc/dnsmasq.d
in dnsmasq config at/etc/dnsmasq.conf
Testing
The container works as expected with additional dnsmasq configuration mounted and without.