This is more of a Watchtower/Docker question than a Caddy one. The answer is that it depends on how you deploy your custom image.
With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially.
If you build a new Caddy image and push it to a container registry, Watchtower can pull that and update the local container.
If you don’t push your custom Caddy builds to a registry - i.e. if you’re just building locally when you need to - I don’t believe Watchtower can help you.
Is there a way on the docker caddy (classic) to install xcaddy through command line ?
When xcaddy is installed I can install inside the docker whatever module I choose right ?
Thank you again for help
Inside the docker image in sh
Is there a way to install inside container xcaddy ?
Idea is to have the caddy container without builder etc. And run a post watchtower update command
Module are no that easy to install (interested in crowdsec)
The add-package command downloads a build from Download Caddy, which has no uptime guarantees. Building from source with xcaddy is more reliable for any kind of automation.
We don’t recommend updating Caddy unattended anyway. There’s no guarantee that there won’t be breaking changes, so you should always be present and perform the update yourself so you’re there to fix your config if something stops working, otherwise you could end up with your server being down while not being able to fix it until you’re back at your desk.
You can sign up for Caddy release notifications, go to https://github.com/caddyserver/caddy then click Watch in the top-right and choose Custom and check only Releases. Keep in mind the Caddy Docker images can lag behind the release on Github (sometimes a few hours, sometimes a couple days, depends on human factors).