-
Notifications
You must be signed in to change notification settings - Fork 40
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
Bug: can't work with Docker secrets #172
Comments
Hi! Thanks for the reporting. There was a recent change in the names of the environment variables by PR #167 so that the README on the main branch (which is about the development version) does not match the stable version you are using. (The older README is at https://github.com/favonia/cloudflare-ddns/blob/v1.4.0/README.markdown.) Sorry about the trouble. While the development version recognizes both the old I guess the development version is stable enough for another release (there's some internal rewrite), and in the meanwhile you could use |
Cool, thanks! One more thing, I'm using secrets for my other Docker services, yet I can't seem to get it to work as usual. Any suggestions? All secrets are in a secrets folder and are defined correctly in the docker-compose file (I'm using 8 secrets and for multiple containers)
Logs:
|
This shouldn't happen and looks like a bug. Please give me some time to check things. (The code was tested against a fake file system during testing, and maybe there are some differences between a real file system and the fake one I missed.) PS: I changed the title for me to track things, but feel free to change it to something you like better. |
A temporary workaround, while not ideal, is to use CF_API_TOKEN, but I suppose you already knew it. |
Yeah, I'm currently using CF_API_TOKEN. Thanks again for the incredible work👍 |
I think I found the problem: golang/go#44279 The issue is that
would fail but
would work (for all the wrong reasons). This was not caught by the current testing because I did not test the paths beginning with the slash |
@V33m I believe I fixed it but you might have to wait for the next release, or use |
Great work! No worries, I'll wait for the next release, hopefully it's not months away🙂 |
@V33m okay I think it's done--- |
Unfortunately I can't get it to work and I think it's related to the path. Regardless if I use
Isn't there a cloudflare-ddns/internal/file/file.go Line 17 in 79bcd9b
Here is an example of how it looks for Traefik |
The error seems to indicate that the group |
@V33m Sorry I made an incorrect comment about |
@V33m Out of curiosity I checked the source code of Traefik. It does not seem to drop any root privileges, and if so, that's why it can read your secret file no matter what the permissions are. The root privileges might be necessary for Traefik, but this also means your system is more vulnerable when Traefik has a security bug. They seem to provide a "rootless" version at https://doc.traefik.io/traefik-enterprise/operations/rootless-image/ which I would recommend for serious business. (It might need more complicated configurations, though.) |
You are absolutely right! I actually thought that running Docker in non-rootless mode, secrets were read and made available to each container. In addition to that I had configured another container with the same PUID/GUID and secrets where everything is fine. Turns out that the container does actuallty not use PUID/GUID... Anyways, thanks for suggesting a rootless image of Traefik. I'll look into this for sure. I've been thinking about running Docker in rootless mode as well, but I guess that's much more of a hassle. Have a good weekend and thanks again for the awesome support! |
@V33m This is a head-up---recent versions (1.13.0+) will benefit from an update to your configuration, and I am on the mission to eliminate the old template from this universe. The environment variables
For more information, please see the CHANGELOG and README. PS: the new template works for older versions of the updater as well! |
Hi, what an awesome service you have created!
I've a minor thing as I can't seem to figure out how to fully disable ipv6 using docker-compose. Hence my logs are full of
Under highlights it says "Ability to enable or disable IPv4 and IPv6 individually." I've tried to disable ipv6 by adding the following to the env in docker-compose:
- IP6_PROVIDER=none
If I set
IP4_POLICY=none
which is listed as a valid value in the readme I get:The text was updated successfully, but these errors were encountered: