Commit Graph

61 Commits (985a9220993d09f0bb0232a558447773ac6006dd)

Author SHA1 Message Date
Simon Aronsson e584f8bfcf
Make it possible to use watchtower to update exited or created containers as well (#289)
* feature/112: add additional tests that verify include-stopped

* feature/112: implement include-stopped

* feature/112: update readme and cli help

* feature/112: fix linting issues

* remove superfluous logging
6 years ago
Simon Aronsson 46ffa16ee2
add tests for check action, resolve wt cleanup bug (#284)
add unit tests for the check action to allow for some
refactoring and bug fixing without having to worry about
breaking stuff.

resolve watchtower cleanup bug by adding an initial 1 second sleep
in the check action. without the sleep, the docker client returns an
empty array, which is why we were left with two watchtowers.
6 years ago
Simon Aronsson 62a95f0e48 Fix linting errors 6 years ago
Simon Aronsson e2228f1b0b improve test coverage and add an api-server mock 6 years ago
Simon Aronsson 3a63b5556f Add placeholder client test 6 years ago
Simon Aronsson f8dd9bb02a improve test coverage 6 years ago
Simon Aronsson 6157c50e4f fix some minor issues 6 years ago
Simon Aronsson 1b82da1ab7 Setup a working pipeline
* add tests to ensure function even after switching docker client api version
* switch docker client api version to remove import of Sirupsen and get rid of the casing workaround
* migrate from glide to dep to go modules
* rewrite ci workflow
  * only run publish on version tags
  * only run build on branches
  * update goreleaser config
  * disable automated latest tag push
* remove dependency to v2tec/docker-gobuilder
* remove dead code and files
* add golands .idea folder to gitignore
* add label to released docker images
* add test reporting, add some unit tests
* change test output dir
* fix goreleaser versions
* add debug output for circleci and goreleaser
* disable cgo
6 years ago
Simon Aronsson ab299b59f8 change repo paths 6 years ago
Fabrizio Steiner d0ac9f14ab some linting 7 years ago
Fabrizio Steiner 1f10817b4b Removed unused mock code. 7 years ago
Fabrizio Steiner 6d4e7cffaf add tests for filters 7 years ago
Fabrizio Steiner 6c12aee975 always exclude containers that have the com.centurylinklabs.watchtower.enable set to false.
Fixes #169
7 years ago
Fabrizio Steiner 026a04b59b implemented enableLabel by a Filter 7 years ago
ubergesundheit d989254b1a change upper case S in sirupsen to lower case to avoid build error 7 years ago
Kaleb Elwert de2ac9341d Add a method of enabling or disabling containers using labels
Switch command line flag from no-enable to label-enable and simplify logic

Add basic documentation for the --label-enable flag
7 years ago
Fabrizio Steiner 52e73d7a8a Do not initiate a RemoveContainer for containers which have AutoRemove (--rm) active.
fixes GH-71
8 years ago
Robotex f8a05cb8ab Added host network check 8 years ago
Tanguy ⧓ Herrmann a5c3e1e05a Make the algorithm follow docker-compose more precisely
https://github.com/v2tec/watchtower/pull/40#discussion_r97719974
8 years ago
Fabrizio Steiner db473821f6 Merge branch 'master' into net 8 years ago
Fabrizio Steiner eda5391d0a go fmt... 8 years ago
Fabrizio Steiner 63aa3efb11 Added glide for vendoring dependencies.
- Docker to 1.13.x
8 years ago
Fabrizio Steiner 5902e9e0be Merge pull request #42 from stffabi/upstream_SelfUpdateFix
Fix for watchtower self update
8 years ago
Fabrizio Steiner f1822f9cd2 Renamed centurylink to v2tec. 8 years ago
Fabrizio Steiner edfad5b786 RenameContainer implemented, this fixes the problem that watchtower can't update itself. 8 years ago
Tanguy ⧓ Herrmann b45fc5a9ba Fix comment from HoundCI
https://github.com/CenturyLinkLabs/watchtower/pull/40#discussion_r94326156
8 years ago
Fabrizio Steiner 32e7a47e58 CliConfig moved. 8 years ago
Fabrizio Steiner c641668356 NewNativeStore has to be called with the CredentialsStore from the configfile. See also 07c4b4124b (diff-b082736d194e2fdfc6aca9d0c86a781bL26) 8 years ago
Tanguy ⧓ Herrmann 4909b90662 go fmt done! 8 years ago
Tanguy ⧓ Herrmann f8a2f80b92 Make an updated container connects to all the previously connected net
With insights from https://github.com/docker/docker/issues/29265
the behaviour is the same as the one from docker-compose

* connect to 1 network (at random) at start
* disconnect from that network
* reconnect to all the network from the previous configuration
8 years ago
Tanguy ⧓ Herrmann fe0e34e857 Reuse the network config for the relaunch 8 years ago
Ross Cadogan dad5d58339 Support loading authentication credentials from Docker config file 8 years ago
Ross Cadogan 6a56597d45 Refactor port mapping functions for build simplicity 8 years ago
Ross Cadogan e75236414e When authentication credentials are supplied as env vars they are always used.
This causes authentication failures on registries that don't match, including public registries.
Fallback to no-authentication to handle the case of public registries.
8 years ago
Ross Cadogan 541264281c Cannot load host Docker config from container. Remove option and rely on environment variables 8 years ago
Ross Cadogan 1c59200565 Registry authentication was failing silently when pulling images.
Load authentication credentials for available credential stores in order of preference:
 1. Environment variables REPO_USER, REPO_PASS
 2. Docker config files
Request image pull with authentication header.
Wait until pull request is complete before exiting function.
8 years ago
Ross Cadogan ef430b791a Add auth config, registry auth fails silently without 8 years ago
Ross Cadogan 42fea79860 Rework TLS support, remove unsupported options 8 years ago
Ross Cadogan b13e6af70f Migrate from codegangsta lib to urfave 8 years ago
Ross Cadogan e011d3e0d2 Discard obsolete samalba/dockerclient library and dependent tests 8 years ago
Ross Cadogan 99ed959155 Port client lib from samalba/dockerclient to docker/docker/client 8 years ago
Ross Cadogan 02bca8d6a4 Improve error reporting 8 years ago
Erin Corson d36899dd7c parameterize repo auth 9 years ago
Erin Corson 337db1d458 merge resolution 9 years ago
Erin Corson f5801669ab updates 9 years ago
Erin Corson b1e70f494e will not compile without these updates due to change in docker lib 9 years ago
Brian DeHamer 7cf2d7f1d8 Support Zodiac-based deployments
Since Zodiac always uses image IDs for deployments we can relay on the
standard container image field to determine the image that was used to
start the container. Luckily, Zodiac writes the original image name to a
label in the container metadata. If we find that Zodiac-specific label
on a running container we will use the associated value when trying to
determine if the container's image has changed.
9 years ago
Brian DeHamer b0910ee20b Add support for whitelist of monitored containers 9 years ago
Brian DeHamer d6321bf8dc Add godoc comments 9 years ago
Brian DeHamer 058d6e5507 Turn DockerClient into dockerClient
No need to export this particular struct since we already have a public
Client interface available and a NewClient function which can be used to
instantiate the concrete struct.
9 years ago