-
-
Notifications
You must be signed in to change notification settings - Fork 99
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]: Updating Docker images (that uses a base image) seemingly doesn't update variables, when the base image does #246
Comments
Thanks for the throughout ticket! Really appreciate it |
No problem 😁 Portainer apparently has the same issue, according to the hotio discord. Is there anything to do about it? 🤔 |
Yeah I'd imagined so. Usually I try to fix even issues Portainer have in Cosmos, like this one : portainer/portainer#2657 But for this, I am really not sure what to do tbh... I think dev should not do this kind of stuff in the first place honestly, env var are here to document a deployement's specific settings. if something is an env var it means we should be fully prepared for users to customize it in the first place, that does not look like it's even possible here because the value is then hardcoded in the RUN command The only thing that could be done that i can see is, if the app was in the market, updating the env var inside the compose in the market woudl actually fix the container if you updated it from the market, basically |
What happened?
So there's this issue I had, specifically with the Docker images that hotio supplies.
He recently updated his base image, with a change to a Docker ENV/VAR, named
S6_STAGE2_HOOK
. It was changed from/init-hook
to/etc/s6-overlay/init-hook
.When the images were updated in Cosmos-server, they didn't change the existing images environment variables to reflect this. They were left as
/init-hook
, which broke most of his images.What should have happened?
The variable
S6_STAGE2_HOOK
should've been updated on the existing containers.How to reproduce the bug?
S6_STAGE2_HOOK
has the value of/init-hook
S6_STAGE2_HOOK
is still set to/init-hook
radarr
logs, and see that everything has gone haywire (vpn/privoxy errors from the hook not working properly)S6_STAGE2_HOOK
manually through CosmosS6_STAGE2_HOOK
will show up with/etc/s6-overlay/init-hook
Relevant log output
No response
Other details
The easy solution was to manually go into every Docker container through Cosmos, remove the
S6_STAGE2_HOOK
variable, press "Update Container" and let Cosmos recreate it, with the now-correctS6_STAGE2_HOOK
variable.I'm thinking this would be great if Cosmos would take this into account, when updating images. That being, when "base" images are updated, and if that somehow affects or changes existing containers variables. So that the user can use the auto update, and be sure knowing that Cosmos will update existing variables ;).
A simple GIF of how it was "solved" in Cosmos:
https://i.imgur.com/hTJKwks.gif
I'm sure other users will end up having this problem, atleast if they use hotio's containers. I made a neat little simple bash script to detect what containers has the
S6_STAGE2_HOOK
variable set to/init-hook
:https://logs.notifiarr.com/?37e0ff883c53d517=#8WuwvRSycAV4MzcMJJsDLDYtEtT48CmUbryiU6C8geUz
System details
The text was updated successfully, but these errors were encountered: