The circle.yml version on this branch will automatically trigger a Circle CI build and push the resulting Docker image to the DockerHub repo rosscado/watchtower. This is a temporary DockerHub repo for the rosscado/watchtower GitHub repo, and can be used to pull or test unofficial watchtower builds before they are merged into the official centurylink/watchtower repos.
This causes authentication failures on registries that don't match, including public registries.
Fallback to no-authentication to handle the case of public registries.
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.
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.
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.
If we receive an error while trying to shutdown/startup a particular
container we don't want to immediately terminate the current update
cycle. Instead we should continue processing the remaining containers
and simply log the error.
Under certain conditions when watchtower is monitoring a Docker Swarm
cluster there would be cases where an updated container could not be
started because the old hadn't yet been removed (name conflicts, mapped
port conflicts, etc). We suspect that this has something to do with the
async nature of swarm and even though we've asked the swarm master to
remove a container it may not be completely removed from the associated
node. The fix is to do some polling after the remove container call to
ensure that the container is truly gone before proceeding.