Commit graph

36 commits

Author SHA1 Message Date
nils måsén
48539c4faf
fix: set nopull param from args (#1830) 2023-11-11 14:50:43 +01:00
donuts-are-good
72e437f173
chore: replace usages of ioutil (#1792) 2023-10-14 10:57:22 +02:00
nils måsén
897b1714d0
fix: only remove container id network aliases (#1724) 2023-09-16 17:16:08 +02:00
jebabin
650acde015
feat: add a label take precedence argument (#1754)
Co-authored-by: nils måsén <nils@piksel.se>
2023-09-16 17:13:41 +02:00
schizo99
dca45f50cb
feat: support container network mode (#1429)
Co-authored-by: nils måsén <nils@piksel.se>
Co-authored-by: Andreas Åhman <andreas.ahman@ingka.ikea.com>
2023-08-08 18:32:44 +02:00
Simon Aronsson
bba9b2b100
fix: empty out the aliases on recreation (#1699)
* fix: empty out the aliases on recreation

* test alias purging
2023-07-28 15:20:22 +02:00
nils måsén
0a5bd54fb7
feat(clean): log removed/untagged images (#1466) 2023-04-15 12:56:51 +02:00
nils måsén
dd1ec09668
fix: always use container interface (#1516) 2023-04-12 17:36:01 +02:00
dependabot[bot]
df1b86bc29
chore(deps): bump docker/docker from 20.10.23+inc to 23.0.2+inc (#1612)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nils måsén <nils@piksel.se>
2023-04-10 13:22:06 +02:00
Gilbert Gilb's
bbbe04119c
feat: add no-pull label for containers (#1574)
Co-authored-by: Nedžad Alibegović <nedzad@nedzad.dev>
Co-authored-by: nils måsén <nils@piksel.se>
2023-03-12 10:07:24 +01:00
nothub
3190ce2df1
feat: ignore removal error due to non-existing containers (#1481)
Co-authored-by: nils måsén <nils@piksel.se>
Fixes https://github.com/containrrr/watchtower/issues/1480
2022-12-06 17:40:26 +01:00
Jauder Ho
e04a107694
chore(deps): update go version to 1.18 (#1363)
Co-authored-by: nils måsén <nils@piksel.se>
2022-09-04 13:56:29 +02:00
nils måsén
e983beb52a
fix: gracefully skip pinned images (#1277)
* move client args to opts struct
* gracefully skip pinned images
* replace newClientNoAPI with literals
2022-05-27 12:16:18 +02:00
nils måsén
47a640b764
update dependencies (sane go.mod) (#1061) 2021-09-29 11:34:05 +02:00
nils måsén
697397f289
feat(log): add context fields to lifecycle events (#1007) 2021-09-19 18:07:32 +02:00
nils måsén
e3dd8d688a
Session report collection and report templates (#981)
* wip: notification stats

* make report notifications optional

* linting/documentation fixes

* linting/documentation fixes

* merge types.Container and container.Interface

* smaller naming/format fixes

* use typed image/container IDs

* simplify notifier and update tests

* add missed doc comments

* lint fixes

* remove unused constructors

* rename old/new current/latest
2021-06-27 09:05:01 +02:00
yrien30
145fe6dbcb
Pre-update lifecycle hook (#793)
* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code #649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code #649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code #649

* Prevent starting new container if old one is not stopped because of lifecycle hook.

* Add null check for c.containerInfo.State in IsRunning

* Fixed that the container would not start

* Added test for preupdate

* EX_TEMPFAIL -> ExTempFail

* Added missing fuction ouput names

* Skip preupdate when container is restarting.
2021-06-24 00:36:33 +02:00
nils måsén
b4cf17d33f
feat: make head pull failure warning toggleable (#912)
* feat: make head pull failure warning toggleable

* expect prometheus tests to go through EVENTUALLY

* wait for queue to be empty before checking test conditions

* clean up new head failure toggle

* fixup! clean up new head failure toggle

* test: add registry tests

* test: add warn on head failure tests

* fix client interface and make tests hit more lines

* make all tests use NewClient instead of creating a struct pointer

* fix lint issues

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
2021-04-23 16:34:21 +02:00
nils måsén
6a9d985ce7
feat(log): use short image/container IDs in logs (#888) 2021-04-18 18:34:38 +02:00
Turtle Kalus
5983d58d7c
Log based on registry known-support - reduce noise on notifications (#716)
Log based on registry known-poor support of HEAD in checking container
manifest.

Some private registries do not support HEAD (E.G. GitLab Container Registry).
With the current config, this log message is causing a notification to be
sent for each container hosted in a registry lacking HEAD support.

log.Debug or log.Warning for failed HTTP HEAD-check based on registry hostname
where HEAD-check is known to fail.

For Docker Hub, a failed HEAD leading to a "regular pull" may count against a
user's call-quota whereas other registry implementations do not support HEAD,
or whose container manifest may be in a different location.
2020-12-23 00:48:38 +01:00
Simon Aronsson
8b81fbd48d
Revert "feat(config): swap viper and cobra for config (#684)"
This reverts commit ff8cb884a0.
2020-12-21 23:08:23 +01:00
nils måsén
ff8cb884a0
feat(config): swap viper and cobra for config (#684) 2020-12-21 15:17:45 +01:00
rg9400
9ac1bf6ca2
fix typo (#702) 2020-12-08 18:40:27 +01:00
Simon Aronsson
cb62b16369
add http head based digest comparison to avoid dockerhub rate limits 2020-12-06 13:21:04 +01:00
yrien30
2842b97df3
Allow watchtower to update rebooting containers (#651)
Co-authored-by: nils måsén <nils@piksel.se>
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
2020-11-19 19:03:17 +01:00
nils måsén
64d48b70c2
fix: return nil imageinfo when retrieve fails (#680) 2020-11-13 21:19:08 +01:00
nils måsén
5efb249a86
Skip updating containers where no local image info can be retrieved (#612)
* Revert "Image of running container no longer needed locally (#571)"

This reverts commit 6da66fb312.

* Update client.go

* fix: skip updating when no image info can be retrieved

This will allow watchtower to continue even though the image info for a
container cannot be retrieved. If this happens one warning will be emitted
and the container will be skipped, unless NoRestart or OnlyMonitor is supplied
2020-08-18 20:55:35 +02:00
Sebastiaan Tammer
6da66fb312
Image of running container no longer needed locally (#571) 2020-06-10 11:34:30 +02:00
Simon Aronsson
1d1c630f7a feat: add timeout override for pre-update lifecycle hook 2020-03-28 19:33:02 +01:00
Simon Aronsson
d1abce889a refactor: extract code from the container package 2020-01-11 23:36:07 +01:00
Simon Aronsson
7b8b8e8ad9 #387 fix: switch to image id map and add additional tests 2020-01-11 00:28:27 +01:00
Zois Pagoulatos
2d8507ca31 Add --revive-stopped flag to start stopped containers after an update (#403)
* Add --revive-stopped flag to start stopped containers after an update

* Update arguments.md
2019-11-13 11:16:37 +01:00
Simon Aronsson
bfae38dbf8
Feat/lifecycle hooks (#351)
* feat(update): add lifecycle hooks to the update action

* fix(ci): add bash tests for lifecycle-hooks to the ci workflow

* fix(ci): move integration tests to an isolated step

* fix(ci): fix malformed all-contributors json

* fix(ci): disable automatic bash test until we figure out a reasonable way to run it in circleci
2019-07-27 01:37:16 +02:00
Simon Aronsson
874180a518 fix: resolve merge issues 2019-07-23 09:36:04 +02:00
Simon Aronsson
e4e1127f8e fix: remove linting issues 2019-07-22 12:10:57 +02:00
Simon Aronsson
74ce92760c refactor: move container into pkg 2019-07-21 20:14:28 +02:00
Renamed from container/client.go (Browse further)