### Install freshdock via cargo or Docker Source: https://freshdock.dev/blog/migrating-from-watchtower-in-5-minutes Two installation methods for freshdock: using cargo install or pulling the multi-arch Docker image. Both result in the same single binary. ```bash cargo install freshdock # or pull the multi-arch image docker pull ghcr.io/turbootzz/freshdock:latest ``` -------------------------------- ### Install freshdock with Cargo Source: https://freshdock.dev/ Install freshdock from crates.io using Cargo. ```shell cargo install freshdock ``` -------------------------------- ### Install and run freshdock check Source: https://freshdock.dev/blog/watchtower-archived-what-to-do Install freshdock via cargo and run the read-only check to see which containers have updates available. This command never touches a container, making it safe for a first trial. ```bash cargo install freshdock freshdock check ``` -------------------------------- ### freshdock check command output Source: https://freshdock.dev/ Example output of the `freshdock check` command showing container statuses. ```text $ freshdock check CONTAINER IMAGE MODE STATUS * traefik traefik:v3.1 live up to date * nextcloud nextcloud:29 nightly updated 04:00, healthy * jellyfin jellyfin/jellyfin:10.9 nightly rolled back, healthcheck failed * postgres postgres:16 watch update available (16.4) * gluetun qmcgaw/gluetun:v3 weekly up to date * vaultwarden vaultwarden/server:1.32 nightly up to date ``` -------------------------------- ### Build freshdock from source Source: https://freshdock.dev/install Builds freshdock from source. Clones the repository, changes into the directory, and runs `just build` to produce the binary at target/release/freshdock. ```shell $git clone https://github.com/Turbootzz/freshdock $cd freshdock $just build # binary at target/release/freshdock ``` -------------------------------- ### Migrate docker-compose.yml from Watchtower to freshdock (before/after) Source: https://freshdock.dev/watchtower-alternative Before-and-after pair for migrating a docker-compose.yml from Watchtower to freshdock. The 'before' block shows the archived Watchtower service with a global WATCHTOWER_SCHEDULE cron; the 'after' block replaces it with the freshdock service using per-container labels (freshdock.enable and freshdock.mode=nightly). Existing watchtower.* labels keep working, but the freshdock.* labels shown are the native spelling with finer-grained knobs. ```yaml # Watchtower (archived) services: app: image: ghcr.io/example/app:latest labels: - "com.centurylinklabs.watchtower.enable=true" watchtower: image: containrrr/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - WATCHTOWER_SCHEDULE=0 0 4 * * * ``` ```yaml # freshdock services: app: image: ghcr.io/example/app:latest labels: - "freshdock.enable=true" - "freshdock.mode=nightly" # 04:00 daily freshdock: image: ghcr.io/turbootzz/freshdock:latest command: ["run"] volumes: - /var/run/docker.sock:/var/run/docker.sock restart: unless-stopped ``` -------------------------------- ### Run freshdock container Source: https://freshdock.dev/ Run freshdock as a Docker container, mounting the Docker socket. ```shell docker run -d --name freshdock \ -v /var/run/docker.sock:/var/run/docker.sock \ ghcr.io/turbootzz/freshdock run ``` -------------------------------- ### docker-compose: Watchtower service before migration Source: https://freshdock.dev/blog/migrating-from-watchtower-in-5-minutes The original docker-compose service configuration using Watchtower with the com.centurylinklabs.watchtower.enable label and a scheduled check at 4 AM. ```yaml services: app: image: ghcr.io/example/app:latest labels: - "com.centurylinklabs.watchtower.enable=true" watchtower: image: containrrr/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - WATCHTOWER_SCHEDULE=0 0 4 * * * ``` -------------------------------- ### Docker Compose service for freshdock with opt-out model Source: https://freshdock.dev/blog/migrating-from-watchtower-in-5-minutes A docker-compose service configuration that enables the Watchtower-style opt-out model using FRESHDOCK_WATCH_ALL and FRESHDOCK_DEFAULT_MODE. This makes every container count as enabled and updates at 04:00. Exclusions are handled via labels like freshdock.mode=off or freshdock.enable=false. ```yaml freshdock: image: ghcr.io/turbootzz/freshdock:latest command: ["run"] environment: FRESHDOCK_WATCH_ALL: "true" # every container counts as enabled FRESHDOCK_DEFAULT_MODE: "nightly" # ...and updates at 04:00 volumes: - /var/run/docker.sock:/var/run/docker.sock restart: unless-stopped ``` -------------------------------- ### docker-compose: FreshDock service after migration Source: https://freshdock.dev/blog/migrating-from-watchtower-in-5-minutes The updated docker-compose service configuration using FreshDock with freshdock.enable and freshdock.mode=nightly labels, and a writable Docker socket for updating modes. ```yaml services: app: image: ghcr.io/example/app:latest labels: - "freshdock.enable=true" - "freshdock.mode=nightly" # 04:00 daily freshdock: image: ghcr.io/turbootzz/freshdock:latest command: ["run"] volumes: - /var/run/docker.sock:/var/run/docker.sock restart: unless-stopped ``` -------------------------------- ### Set freshdock.mode labels for nightly and watch Source: https://freshdock.dev/blog/notify-only-vs-auto-update Two Docker Compose label blocks showing the two freshdock modes: nightly for auto-update with a safety net, and watch for notify-only. The watch mode is the default and is a legitimate permanent choice, equivalent to Diun's entire purpose. ```yaml # auto-update nightly, with the safety net labels: - "freshdock.enable=true" - "freshdock.mode=nightly" ``` ```yaml # detect updates, but only tell me, never restart labels: - "freshdock.enable=true" - "freshdock.mode=watch" ``` -------------------------------- ### Opt-in label: freshdock.enable=true Source: https://freshdock.dev/blog/how-freshdock-decides-when-to-update Opt-in label for a container. Without this label (or with FRESHDOCK_WATCH_ALL=true and no opt-out), freshdock ignores the container entirely. ```yaml labels: - "freshdock.enable=true" # now freshdock can see it ``` -------------------------------- ### Run freshdock check Source: https://freshdock.dev/install Read-only status check. Shows which containers are enabled and in watch mode without pulling, stopping, or recreating anything. ```shell $freshdock check ``` -------------------------------- ### CLI: freshdock check Source: https://freshdock.dev/blog/how-freshdock-decides-when-to-update CLI command to see digest checks and update decisions without making changes. Useful for verifying the current state before enabling automatic updates. ```bash freshdock check ``` -------------------------------- ### Docker Compose configuration for freshdock Source: https://freshdock.dev/install Docker Compose configuration for freshdock in watch mode with a read-only socket. Mounts the Docker socket read-only and restarts unless stopped. ```yaml # minimal-watch.yml: opt in, notify only services: freshdock: image: ghcr.io/turbootzz/freshdock:latest command: ["run"] volumes: - /var/run/docker.sock:/var/run/docker.sock:ro restart: unless-stopped ``` -------------------------------- ### Pull freshdock Docker image Source: https://freshdock.dev/ Pull the freshdock Docker image from GitHub Container Registry. ```shell docker pull ghcr.io/turbootzz/freshdock ``` -------------------------------- ### Label a container with freshdock Source: https://freshdock.dev/ Add freshdock labels to a container in docker-compose.yml to enable updates. ```yaml labels: - "freshdock.enable=true" - "freshdock.mode=nightly" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.