-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe the bug
According to the documentation at https://containrrr.dev/watchtower/http-api-mode/, when using the HTTP API mode the periodic checking is disabled. To re-enable it, one should use the --http-api-periodic-polls
flag when running watchtower.
Using the latest image I get the following error:
watchtower_1 | time="2021-11-11T14:20:58+01:00" level=fatal msg="unknown flag: --http-api-periodic-polls"
To Reproduce
Run the following docker-compose:
version: "3"
services:
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --http-api-periodic-polls
environment:
TZ: "Europe/Zurich"
WATCHTOWER_DEBUG: "true"
WATCHTOWER_HTTP_API_UPDATE: "true"
WATCHTOWER_HTTP_API_TOKEN: "mytoken"
WATCHTOWER_SCHEDULE: "0 */10 * ? * *"
ports:
- 8080:8080
Expected behavior
The HTTP API should be enabled, and periodic checks should also be enabled
Screenshots
Environment
Docker version 20.10.8, build 3967b7d
docker-compose version 1.29.2, build 5becea4c
Logs from running watchtower with the --debug
option
docker-compose up
Pulling watchtower (containrrr/watchtower:)...
latest: Pulling from containrrr/watchtower
e0c7a3e4c313: Pull complete
db1b75c6d82b: Pull complete
5bdc0dfc1598: Pull complete
Digest: sha256:3283e0b5be326d77ff4f4e8b7a91d46aaa1d511c74877b5a32f161548812d00c
Status: Downloaded newer image for containrrr/watchtower:latest
Creating desktop_watchtower_1 ... done
Attaching to desktop_watchtower_1
watchtower_1 | Error: unknown flag: --http-api-periodic-polls
watchtower_1 | Usage:
watchtower_1 | watchtower [flags]
watchtower_1 |
watchtower_1 | Flags:
watchtower_1 | -a, --api-version string api version to use by docker client (default "1.25")
watchtower_1 | -c, --cleanup remove previously used images after updating
watchtower_1 | -d, --debug enable debug mode with verbose logging (default true)
watchtower_1 | --enable-lifecycle-hooks Enable the execution of commands triggered by pre- and post-update lifecycle hooks
watchtower_1 | -h, --help help for watchtower
watchtower_1 | -H, --host string daemon socket to connect to (default "unix:///var/run/docker.sock")
watchtower_1 | --http-api-metrics Runs Watchtower with the Prometheus metrics API enabled
watchtower_1 | --http-api-token string Sets an authentication token to HTTP API requests. (default "mytoken")
watchtower_1 | --http-api-update Runs Watchtower in HTTP API mode, so that image updates must to be triggered by a request (default true)
watchtower_1 | --include-restarting Will also include restarting containers
watchtower_1 | -S, --include-stopped Will also include created and exited containers
watchtower_1 | -i, --interval int poll interval (in seconds) (default 86400)
watchtower_1 | -e, --label-enable watch containers where the com.centurylinklabs.watchtower.enable label is true
watchtower_1 | -m, --monitor-only Will only monitor for new images, not update the containers
watchtower_1 | --no-color Disable ANSI color escape codes in log output
watchtower_1 | --no-pull do not pull any new images
watchtower_1 | --no-restart do not restart any containers
watchtower_1 | --no-startup-message Prevents watchtower from sending a startup message
watchtower_1 | --notification-email-delay int Delay before sending notifications, expressed in seconds
watchtower_1 | --notification-email-from string Address to send notification emails from
watchtower_1 | --notification-email-server string SMTP server to send notification emails through
watchtower_1 | --notification-email-server-password string SMTP server password for sending notifications
watchtower_1 | --notification-email-server-port int SMTP server port to send notification emails through (default 25)
watchtower_1 | --notification-email-server-tls-skip-verify Controls whether watchtower verifies the SMTP server's certificate chain and host name.
watchtower_1 | Should only be used for testing.
watchtower_1 | --notification-email-server-user string SMTP server user for sending notifications
watchtower_1 | --notification-email-subjecttag string Subject prefix tag for notifications via mail
watchtower_1 | --notification-email-to string Address to send notification emails to
watchtower_1 | --notification-gotify-tls-skip-verify Controls whether watchtower verifies the Gotify server's certificate chain and host name.
watchtower_1 | Should only be used for testing.
watchtower_1 | --notification-gotify-token string The Gotify Application required to query the Gotify API
watchtower_1 | --notification-gotify-url string The Gotify URL to send notifications to
watchtower_1 | --notification-msteams-data The MSTeams notifier will try to extract log entry fields as MSTeams message facts
watchtower_1 | --notification-msteams-hook string The MSTeams WebHook URL to send notifications to
watchtower_1 | --notification-slack-channel string A string which overrides the webhook's default channel. Example: #my-custom-channel
watchtower_1 | --notification-slack-hook-url string The Slack Hook URL to send notifications to
watchtower_1 | --notification-slack-icon-emoji string An emoji code string to use in place of the default icon
watchtower_1 | --notification-slack-icon-url string An icon image URL string to use in place of the default icon
watchtower_1 | --notification-slack-identifier string A string which will be used to identify the messages coming from this watchtower instance (default "watchtower")
watchtower_1 | --notification-template string The shoutrrr text/template for the messages
watchtower_1 | --notification-url stringArray The shoutrrr URL to send notifications to
watchtower_1 | -n, --notifications strings notification types to send (valid: email, slack, msteams, gotify, shoutrrr)
watchtower_1 | --notifications-level string The log level used for sending notifications. Possible values: panic, fatal, error, warn, info or debug (default "info")
watchtower_1 | --remove-volumes remove attached volumes before updating
watchtower_1 | --revive-stopped Will also start stopped containers that were updated, if include-stopped is active
watchtower_1 | --rolling-restart Restart containers one at a time
watchtower_1 | -R, --run-once Run once now and exit
watchtower_1 | -s, --schedule string the cron expression which defines when to update (default "0 */10 * ? * *")
watchtower_1 | --scope string Defines a monitoring scope for the Watchtower instance.
watchtower_1 | -t, --stop-timeout duration timeout before a container is forcefully stopped (default 10s)
watchtower_1 | -v, --tlsverify use TLS and verify the remote
watchtower_1 | --trace enable trace mode with very verbose logging - caution, exposes credentials
watchtower_1 | --warn-on-head-failure string When to warn about HEAD pull requests failing. Possible values: always, auto or never
watchtower_1 |
watchtower_1 | time="2021-11-11T14:20:58+01:00" level=fatal msg="unknown flag: --http-api-periodic-polls"
desktop_watchtower_1 exited with code 1
Additional context
Couple of notes: The current documentation has a wrong flag for the http api server. Also, I do not see why the two should be mutually exclusive...in theory if I do not want periodic checks I can just not set the expression or am I missing something?