Handle containers that need a custom build step? #897
Replies: 6 comments
|
Drydock will not notice this change from the Compose file alone. The current watcher compares the running container's For this setup, use a build pipeline outside Drydock:
Drydock can then see the published tag/digest change and pull the rebuilt image. If the custom image remains local-only, keep the rebuild/recreate operation in the external watcher/CI job (for example This follows the current docs/source:
|
|
Ok sure, that would work but that is quite some manual complexity in my opinion. Would it be possible to extend drydock in that regard to support this case? There is already the option "dd.registry.lookup.image" which allows us to manually reference a registry image, right? So, maybe drydock could watch the container even if it is a local build when this option is set and then monitor the image mentioned in that option? Still the transform option could be used to transform the locally assigned image_name to extract a proper semver version. Like: So maybe the watcher in drydock could be triggered with this and then we can run a command trigger with it to do the manual build step. |
|
Thanks for the concrete proposal. I checked the current watcher path: |
|
Short answer: it cannot work today, and your labels are not what stops it. The watcher gives up before the lookup label is ever consulted. That gate is deliberate. It exists so local images do not fire anonymous 401s and 404s at the registry and get counted as watch errors. So what you are asking for is a code change, not a config one. Two things in the labels anyway, for when this does become possible:
The part worth thinking through before building it: if the watcher did see an update, the Docker action would pull upstream telegraf and recreate your container with the stock image, which drops your ipset layer. So detection alone is not the feature. It needs detection plus a command trigger that runs your build, with the Docker action excluded for that container. Your instinct about the command trigger was right, it just needs the gate solved first. The request itself is reasonable and I am keeping it open. Watching a local build against a declared upstream base is a real gap, and the @Labeeb2339 thanks for the detailed answer above, the external CI pipeline is the correct workaround today. |
|
Okay, thank you. Appreciate it. |
|
No problem. I have written this up as a feature request rather than leaving it buried in the thread, since the shape is clear enough to build: a local-build mode where a lookup reference drives version discovery only, the local The pull-and-replace behaviour is the part that has to be solved first. Without that, a working update would quietly swap your patched image for stock telegraf, which is worse than not detecting the update at all. |
Uh oh!
There was an error while loading. Please reload this page.
Hi there, I have one case in my container zoo that is a bit special (probably not too special though): A container that has a build command inside the docker compose file. So, when a new version comes out then the
arghas to be updated and the image has to be built. The file looks like this:Just for information, this is the Dockerfile (it just adds the
ipsetbinary to the base image):I thought about having a command trigger in drydock that runs a custom script when a new base image is available to handle the situation but it seems drydock is not watching my local custom image:

Any ideas what I can do about it? This could also be a feature request if needed :) Thank you
All reactions