-
Notifications
You must be signed in to change notification settings - Fork 908
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
Add more explanation to "As a workaround, you can create a symlink to your config.json file and then mount the symlink in the container." #1202
Comments
Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏 |
You can name your link anything, it should point at your normal Example:
|
and on linux, you'd do |
Ehm, that was just a typo. Too much powershell shenanigans recently.... |
I'm reasonably sure this doesn't work. If the target of the symlink changes inode, docker doesn't rebind. The only way I know of is to mount the directory containing the config file, and then symlink /config.json to the file within that. |
I tried testing it just now, and I couldn't get any editor to change the inode (tried vscode and vim using "backup" and "writebackup"). Not sure what is going on. But I also think that the intended solution was supposed to be a hard link, since the reason for why it would work is that the file would have an additional inode ref, meaning that replacing the file would sever the link. This in turn would cause editors to not use the replace method of writing to the file. At least, that is how I interpeted it. But yeah, I cannot reproduce the problem at all right now, so... 🤷♀️ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
So, I'm opening this up again, because i face the same issues.
|
@MerlinChiodo
(in the original example, it was |
If anyone has a suggestion on how to rephrase the docs to make it clearer, PRs are welcome. ✨ |
I believe the real issue is not on how to make the instructions clearer, but rather that the proposed solution simply does not work. I've done a couple of tests, as I need to refresh the azure token to access a private azure container registry with the machine's service principal.
The only viable solution, from what I could test, is mounting a folder and passing the |
1 and 2: How are you refreshing the token? The file can be overwritten without changing the inode. I couldn't find a way to make vscode or vim use the "replace" method of writing changes to a file without explicitly forcing it. 3: I think the idea was to mount the folder ( |
We are not manually editing the file. We are refreshing the token with the azure cli, by running But you can confirm this by calling |
Is your feature request related to a problem? Please describe.
I'm always frustrated when there is no clear way to "As a workaround, you can create a symlink to your config.json file and then mount the symlink in the container.". I have no idea how it should be symlink, from where to where, what kind of symlink (hard/soft...). A simple example would help.
Needs to symlink the .docker folder, the config file? etc
Describe the solution you'd like
No idea how to use config as explained here: https://containrrr.dev/watchtower/usage-overview/
Describe alternatives you've considered
No idea where needs to be symlinked.
Additional context
The text was updated successfully, but these errors were encountered: