Describe the bug
When I run a container with the option stop-timeout, the watchtower crashs with the following fatal error: "flag provided but not defined: -stop-timeout".
To Reproduce
Steps to reproduce the behavior:
docker run --rm -it v2tec/watchtower:latest --stop-timeout 30sExpected behavior
It is expected that the application accept this flag and change the default wait time to 30 seconds, according to documentation.
Environment
Logs from running watchtower with the --debug option
Incorrect Usage. flag provided but not defined: -stop-timeout
NAME:
watchtower - Automatically update running Docker containers
USAGE:
watchtower [global options] command [command options] [arguments...]
VERSION:
0.3.0 - fbf6c0d620cd1c1c6a3b66cb6cd2280ffe073c43 - 2018-03-02T15:09:04Z
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--host value, -H value daemon socket to connect to (default: "unix:///var/run/docker.sock") [$DOCKER_HOST]
--interval value, -i value poll interval (in seconds) (default: 300) [$WATCHTOWER_POLL_INTERVAL]
--schedule value, -s value the cron expression which defines when to update [$WATCHTOWER_SCHEDULE]
--no-pull do not pull new images [$WATCHTOWER_NO_PULL]
--no-restart do not restart containers [$WATCHTOWER_NO_RESTART]
--cleanup remove old images after updating [$WATCHTOWER_CLEANUP]
--tlsverify use TLS and verify the remote [$DOCKER_TLS_VERIFY]
--label-enable watch containers where the com.centurylinklabs.watchtower.enable label is true [$WATCHTOWER_LABEL_ENABLE]
--debug enable debug mode with verbose logging
--notifications value notification types to send (valid: email, slack) [$WATCHTOWER_NOTIFICATIONS]
--notifications-level value The log level used for sending notifications. Possible values: "panic", "fatal", "error", "warn", "info" or "debug" (default: "info") [$WATCHTOWER_NOTIFICATIONS_LEVEL]
--notification-email-from value Address to send notification e-mails from [$WATCHTOWER_NOTIFICATION_EMAIL_FROM]
--notification-email-to value Address to send notification e-mails to [$WATCHTOWER_NOTIFICATION_EMAIL_TO]
--notification-email-server value SMTP server to send notification e-mails through [$WATCHTOWER_NOTIFICATION_EMAIL_SERVER]
--notification-email-server-port value SMTP server port to send notification e-mails through (default: 25) [$WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT]
--notification-email-server-tls-skip-verify Controls whether watchtower verifies the SMTP server's certificate chain and host name. If set, TLS accepts any certificate presented by the server and any host name in that certificate. In this mode, TLS is susceptible to man-in-the-middle attacks. This should be used only for testing. [$WATCHTOWER_NOTIFICATION_EMAIL_SERVER_TLS_SKIP_VERIFY]
--notification-email-server-user value SMTP server user for sending notifications [$WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER]
--notification-email-server-password value SMTP server password for sending notifications [$WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD]
--notification-slack-hook-url value The Slack Hook URL to send notifications to [$WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL]
--notification-slack-identifier value A string which will be used to identify the messages coming from this watchtower instance. Default if omitted is "watchtower" (default: "watchtower") [$WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER]
--help, -h show help
--version, -v print the version
FATA[0000] flag provided but not defined: -stop-timeout
Temporary workaround
Use instead the environment variable 'WATCHTOWER_TIMEOUT'.
Hi there! 馃憢馃徏 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 馃檹
Welcome and thank you for your report! 馃檹馃徏
While this for sure is an error, I would argue it's not a fatal one, as watchtower never even starts. 馃槣
Will have a look as soon as time allows.
Use containrrr/watchtower:latest instead. The v2tec/watchtower:latest is stuck on 0.3.0 and the documentation is referring to 0.3.11
Ah, great catch @piksel !
Closing this then.
Thank you very much!! I didn't realize that I was using an outdated image...
Thank you very much!! I didn't realize that I was using an outdated image...
A very easy mistake to make unfortunately, and I've been unsuccessful in persuading docker to remove the old image. Maybe this is something @stffabi has access to? It would for sure decrease the confusion.
Most helpful comment
Ah, great catch @piksel !