Code Monkey home page Code Monkey logo

watchtower's People

Contributors

8ear avatar allcontributors[bot] avatar auanasgheps avatar bdehamer avatar bugficks avatar cnrmck avatar daxserver avatar dependabot[bot] avatar dolanor avatar fomk avatar haswalt avatar jamesmacwhite avatar jauderho avatar jebabin avatar jnidzwetzki avatar ksurl avatar mbrandau avatar mindrunner avatar nothub avatar piksel avatar rdamazio avatar robotex avatar rosscado avatar simskij avatar stffabi avatar tammert avatar thelamer avatar ubergesundheit avatar victorcmoura avatar zoispag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watchtower's Issues

Support .dockercfg / authConfig for using watchtower with images from private registry

To support pulling private images. I want to mount a .dockercfg file containing the authconfig or give an env with the (base64 encoded) version of .dockercfg to the watchtower container.

from: https://docs.docker.com/reference/api/docker_remote_api/

  • Since API version 1.2, the auth configuration is now handled client side, so the client has to send the authConfig as a POST in /images/(name)/push.
    authConfig, set as the X-Registry-Auth header, is currently a Base64 encoded (JSON) string with the following structure: {"username": "string", "password": "string", "email": "string", "serveraddress" : "string", "auth": ""}. Notice that auth is to be left empty, serveraddress is a domain/ip without protocol, and that double quotes (instead of single ones) are required.

Something like this: https://github.com/fsouza/go-dockerclient/blob/master/auth.go#L50

Trigger container restart via WebHook

Hi, instead of checking for the changes every N seconds, it would be nice to trigger container's restart once new image has been pushed successfully to the docker hub etc. Any ideas how to implement this?

Doesn't update image of multiple containers when docker-compose scale is used

I have scaled up one of the containers to two instances using docker-compose. When the image updates, only the first instance of the container is updating its image fine. The other doesn't update

Before:
image

Then, updating image.

Can see that it's getting detected in the Watchtower logs
image

Situation now....
image

The second container just shows the ID of the old image.

latest release on hub.docker.com

Hi,

on dockerhub the centurylink/watchtower is linking to this repository but it is last pushed: a year ago.
How do I get the latest version?
If I try to run another version (e.g. dockhippie/watchtower) I get an error, that my docker client (1.26) is newer then my docker server (1.24). How is this possible, when I run the container with -v /var/run/docker.sock:/var/run/docker.sock \?

Support for AWS's ECR

Amazon Web Service's Elastic Container Registry changes it's authentication token every 12 hrs. So setting REPO_USER & REPO_PASS only work for that long...

I would like to be able to set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY & AWS_REGION and then have watchtower regenerate (via AWS's API) the authentication token as needed.

Without this, it doesn't appear possible to use watchtower with ECR.

Thanks!

Not updating images

This is what my logs look like:

time="2016-09-15T08:05:03Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:05:08Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"
time="2016-09-15T08:10:14Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:10:18Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"
time="2016-09-15T08:15:24Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:15:58Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"
time="2016-09-15T08:21:04Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:21:08Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"
time="2016-09-15T08:26:14Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:26:24Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"
time="2016-09-15T08:27:07Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:27:13Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"
time="2016-09-15T08:27:51Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:27:56Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"
time="2016-09-15T08:33:07Z" level=info msg="Checking containers for updated images"
time="2016-09-15T08:33:11Z" level=info msg="Found new google/cadvisor:latest image (408f9d196ec60e9b4ddf14239cf23066ef03a80ad0f1c0d82868c9cba04f1ddc)"

Started with the following configuration:

watchtower:
  image: centurylink/watchtower
  volumes:
   - /var/run/docker.sock:/var/run/docker.sock
  command: --cleanup

It finds that the image is outdated, but doesn't do anything about it

add new container into the monitor list

As in the mode of monitoring particular containers for automatic updates and to avoid the unexpected updates of containers such as database, currently I need to stop and remove watchtower and re-run the setup script to add a new container to the monitor list.

Is there some command like "docker exec -it watchtower add <container_name>" for doing this?

Fails to restart linked container

I have a scenario where there's a container c1 that is linked to another container c2. According to the readme, when Watchtower detects a new version of c2's image, it should restart c1 as well.

However, after Watchtower successfully stops both containers then updates and restarts c2, it fails to restart c1 with a cryptic "Not found" error message. Then it actually tries to delete c1's image โ€” which is very undesirable since it's only supposed to be restarted, not replaced by an updated version. (Fortunately, the undesirable delete doesn't succeed, though it also doesn't report any errors.)

Here's the log:

time="2016-09-23T22:16:34Z" level=debug msg="Retrieving running containers"
time="2016-09-23T22:16:34Z" level=debug msg="Pulling localhost:5000/test1:latest for /c1"
time="2016-09-23T22:16:34Z" level=debug msg="Pulling localhost:5000/test2:latest for /c2"
time="2016-09-23T22:16:34Z" level=info msg="Found new localhost:5000/test2:latest image (sha256:dcda537d49cd8df308184fd022ec34668cda2f4dfab4417ebc730b3dd57208b1)"
time="2016-09-23T22:16:34Z" level=info msg="Stopping /c1 (fd3a3bbf816dd25b2f8d91000f751b6937f7021dac59fa31f9d84754e1b8096a) with SIGTERM"
time="2016-09-23T22:16:36Z" level=debug msg="Removing container fd3a3bbf816dd25b2f8d91000f751b6937f7021dac59fa31f9d84754e1b8096a"
time="2016-09-23T22:16:36Z" level=info msg="Stopping /c2 (9716e7189ec7fe338feaa7a9f3e91e3deb1072f7a5fd6f538f823d6312639a33) with SIGTERM"
time="2016-09-23T22:16:46Z" level=debug msg="Removing container 9716e7189ec7fe338feaa7a9f3e91e3deb1072f7a5fd6f538f823d6312639a33"
time="2016-09-23T22:16:49Z" level=info msg="Starting /c2"
time="2016-09-23T22:16:50Z" level=debug msg="Starting container /c2 (cd89ea5e1308d66d75b098625a92117a4f8d29d03df03d5bd14757707aad0e6e)"
time="2016-09-23T22:16:54Z" level=info msg="Removing image sha256:a90aaa79b6d4031903b648f12494817426d54cf63bc3a41b26c69a29a843731e"
time="2016-09-23T22:16:54Z" level=info msg="Starting /c1"
time="2016-09-23T22:16:55Z" level=debug msg="Starting container /c1 (bfd966338ec61165934c7b21bbebd04fbdb9e0b9641b7f137f803c60527eda60)"
time="2016-09-23T22:16:55Z" level=error msg="Not found"
time="2016-09-23T22:16:55Z" level=info msg="Removing image sha256:6507b6cfec603dbc3e87292beb5c8cf4a7e98120c586c671992f1cc25b1008e8"

Here's the output of docker ps -a after this failure:

CONTAINER ID   IMAGE                         COMMAND                CREATED         STATUS         PORTS  NAMES
bfd966338ec6   localhost:5000/test1:latest  "node /opt/test"        31 seconds ago  Created               c1
cd89ea5e1308   localhost:5000/test2:latest  "/bin/sh -c 'mv /test"  36 seconds ago  Up 31 seconds         c2
83fc471a02ec   armhfbuild/watchtower        "/watchtower --debug "  3 minutes ago   Up 2 minutes          wt

And here's the output of docker images:

REPOSITORY             TAG     IMAGE ID      CREATED         SIZE
localhost:5000/test2   latest  dcda537d49cd  44 minutes ago  6.007 MB
localhost:5000/test1   latest  6507b6cfec60  27 hours ago    25.45 MB
armhfbuild/watchtower  latest  93a7c5132e23  7 months ago    7.318 MB

Here's my docker-compose.yml file:

c1:
    container_name: c1
    image: localhost:5000/test1:latest
    restart: unless-stopped
    ports:
        - 3000:3000
    privileged: true
    volumes:
        - /dev:/dev:ro
    volumes_from:
        - c2
    links:
        - c2

c2:
    container_name: c2
    image: localhost:5000/test2:latest
    restart: unless-stopped
    volumes:
        - test-volume:/test-volume

wt:
    container_name: wt
    image: armhfbuild/watchtower
    restart: unless-stopped
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
    command: --debug --interval 30 --cleanup c1 c2

Logger not working through multiprocessing Process

Hello,

I started another Process using multiprocessing module, but the watchtower was unable to logging on Aws Cloud Watch. See this example:

import logging
import watchtower
import multiprocessing as mp

logging.basicConfig(level=logging.NOTSET, format="%(message)s")
logger = logging.getLogger(name)
logger.addHandler(watchtower.CloudWatchLogHandler(log_group="my_log_group",
stream_name="my_stream_name"),
)

def another_process():
logger.info("message info inside another process")
logger.error("messege error inside another process")

if name == "main":

logger.info("message info main")
logger.error("message error main")

p = mp.Process(target=another_process)
p.start()
p.join()

logger.info("Finish :-)")

See this image with what happened:

image

Just messages inside main function worked.

How can I do to log the messages inside Process ?
This is a bug ?
There is a configuration to enable this feature ?

Thank you.
Victor Jabur

Not restarting container after updating images

My log details

rancher@susiaalimbssro2:~$ sudo docker logs -f c1d1e6d75953
INFO[0000] First run: 2017-04-11 19:01:59 +0000 UTC

INFO[0299] Checking containers for updated images
INFO[0301] Found new streamsets/datacollector:latest image (sha256:0014c798cc0f99168ba0f2a9b1f66f241d1c0df71b487c604599c610fedd8943)
INFO[0305] Found new bekt/logspout-logstash:latest image (sha256:b95771a453e78e785c403a2d1f301fa1b0b962c309babd06317b6d122ffa777a)
INFO[0317] Found new rancher/net:holder image (sha256:665d9f6e8cc1ec3fa1181398d0661715cf71134db65666072998c54dbeeb7072)
INFO[0319] Stopping /r-ipsec-ipsec-3-c389ba67 (69bcaa601bfa713120af783a12366d2f4c7b9386c045913e4f969a1ece47a132) with SIGTERM
INFO[0329] Stopping /r-elasticsearch-5-logspout-3-d2508349 (117dbcf8ad81253db0e4ada6dcd66b3dfd3a42f2b99e807dfc66a7fb2dd3f117) with SIGTERM
INFO[0330] Stopping /r-streamsets_test-13868513 (472e42d311579a691a6df4c10d58703aec203d8a1d0be844bae0a0d435fe552b) with SIGTERM
INFO[0331] Creating /r-streamsets_test-13868513
INFO[0332] Creating /r-elasticsearch-5-logspout-3-d2508349
INFO[0332] Creating /r-ipsec-ipsec-3-c389ba67
INFO[0599] Checking containers for updated images
INFO[0899] Checking containers for updated images
INFO[1199] Checking containers for updated images
INFO[1499] Checking containers for updated images
INFO[1799] Checking containers for updated images
INFO[2099] Checking containers for updated images
INFO[2399] Checking containers for updated images


docker ps -a shows that the container is exited

036154f6805f streamsets/datacollector:2.4.1.0 "/docker-entrypoin..." 54 minutes ago Exited (143) 51 minutes ago stupefied_haibt

Please check this one.

Question: self updating application

I have a web application that needs to support updating itself.

My user interface will query a docker registry, and determine if updates are available. If there is a new image, I will download it and add it to my docker host. I will be doing this inside of my application (using /var/run/docker.dock).

Watch tower will eventually see that an image is updated, and it will restart the container that installed the image.

My problem is that I need my web application to perform this at a very exact moment. When my users press "update", the update can't begin later, it must happen at that exact moment.

This brings me to my main question.

What about adding support for an HTTP/REST api for manually triggering the update of a container?

not able to download/update from my private docker registry.

Hello,

I am using the gitlab docker registry and i get a error like below:
weslley@pc:~/ahpi$ docker run -it -e REPO_USER="weslley" -e REPO_PASS="password!" -e REPO_EMAIL="[email protected]" -v /var/run/docker.sock:/var/run/docker.sock centurylink/watchtower

INFO[0000] Checking containers for updated images
Get https://registry.private.com.br/v2/git/pw2/manifests/pwnginx: denied: access forbidden

Or
the error below that is trying to use the docker registry.. how can i specify my gitlab docker registry?

docker run -it -e REPO_USER="weslley" -e REPO_PASS="password" -e REPO_EMAIL="[email protected]"
-v /var/run/docker.sock:/var/run/docker.sock
drud/watchtower --interval 30

INFO[0000] Checking containers for updated images
Get https://registry-1.docker.io/v2/drud/watchtower/manifests/latest: unauthorized: incorrect username or password

Thank you.

Multiple network support

I use docker-compose, and I have a container connected to 2 networks, but only 1 is connected again during an upgrade.
Without this it's hard to have tiered application (which became quite simple with docker-compose)

Remove apiversion flag

The apiversion flag introduced with #26 should be removed. The user of watchtower should not be needed to decide on which API version it should run. The minimal API required to run depends on the implementation of watchtower, namely depends on the used API calls and members. Therefore watchtower should fix the minimal API version required.

With version v0.1.0 the minimal API version will be set to 1.24, basically all my testing currently based on this one. Requiring 1.24 API version basically demands docker 1.12.x or newer, therefore also docker 1.13.x is supported.

Can't pull from registry.gitlab.com

Hello Guys,

I have searched in the issues to see if there is a solution to it but i am not able to pull from any of my private repositories.

Am I missing something?

docker run -d
--name watchtower
-v /home/weslley/.docker/config.json:/config.json
-v /var/run/docker.sock:/var/run/docker.sock
drud/watchtower
--cleanup
-i 10
--debug

I have looked to the logs and it just say "... denied: access forbidden"

I also tried

docker run -d
--name watchtower
-e REPO_USER="user"
-e REPO_PASS="pass"
-v /var/run/docker.sock:/var/run/docker.sock
drud/watchtower
--cleanup
-i 10
--debug

Can anyone help me ?

THank you.

Supported params in drud/watchtower

Hey!

So far I have only seen that it supports --debug, I tried interval, but it doesn't seem to work.
Is this image stripped of the params the common params or am I doing something wrong?

P.S.: I tried to search for drud/watchtower repo and I couldn't find it, altho I have seen PRs from that one...

Unable to update container

My docker-compose file (in a private repo):

version: "3"
services:
  cavo:
    image: adventhp/cavo:docker
    env_file:
      - app.docker.env
    ports:
      - "443:3443"
      - "80:3080"
    entrypoint: ["pm2-docker", "/home/code/process.yml"]
  watchtower:
    image: v2tec/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /root/.docker/config.json:/config.json

I'm starting this as root with:

docker-compose up

My log files show that watchtower is checking for updates every 5 minutes, but instead of pulling the latest image, I see this message in the logfile:

watchtower_1  | time="2017-03-16T04:50:32Z" level=info msg="Unable to update container /ubuntu_cavo_1. Proceeding to next."

I've verified the location and validity of both volumes.
I have no problem issuing a docker pull adventhp/cavo:docker command.

Image not found, private repository

I'm getting the below issue when trying to update my images from a private repository. I've provided the config.json to authenticate against my repository. I'm running https://hub.docker.com/_/registry/ as my registry. Any idea why this might be happening?

user@server:~$ docker run -d --name watchtower -v /home/user/.docker/config.json:/config.json -v /var/run/docker.sock:/var/run/docker.sock centurylink/watchtower --debug
3c0c984b54da2e3d02743a473f8bae7ca21196f4c8efef5c1d6189b33da4e872
user@server:~$ docker logs watchtower 
time="2017-01-17T19:40:05Z" level=debug msg="Retrieving running containers" 
time="2017-01-17T19:40:05Z" level=info msg="Checking containers for updated images" 
time="2017-01-17T19:40:05Z" level=debug msg="Retrieving running containers" 
time="2017-01-17T19:40:05Z" level=debug msg="Pulling centurylink/watchtower:latest for /watchtower" 
time="2017-01-17T19:40:06Z" level=debug msg="Pulling privateregistry:443/my-image for /project_web_1" 
Error: image my-image not found

Docker pull works on my local machine using the same credentials. My registry uses a self signed certificate, so I had to add a ca.crt to /etc/ssl/certs.d/privateregistry:443/ca.crt. Do I need to mount this in the watchtower container as well?

Permission denied when pulling private image from quay.io

Hi, I want to check quay.io private repo update by watchtower.

But I always got

Error: Status 403 trying to pull repository private/repo-name: "{\"error\": \"Permission Denied\"}"

OS: Ubuntu 15.04
Docker version: 1.9.1

Any solution?

Doesn't work if container started with --rm option

If you attempt to update a container that has been started with the --rm option, watchtower errors out while waiting for it to be removed:

time="2017-03-24T09:16:02Z" level=info msg="Found new my-daemon-armhf:latest image (sha256:2f2586a3ceb8b8fa7a121678a38fbc2fbe872af8be31d70035a73a9c83f232f5)" 
time="2017-03-24T09:16:02Z" level=info msg="Stopping /my-daemon (5e4f0937d15de47c3331b0b4c5c78c514fa7eaa31ea55e09735eac8c9ca72801) with SIGTERM" 
time="2017-03-24T09:16:04Z" level=error msg="Error response from daemon: removal of container 5e4f0937d15de47c3331b0b4c5c78c514fa7eaa31ea55e09735eac8c9ca72801 is already in progress" 
time="2017-03-24T09:16:04Z" level=info msg="Creating /my-daemon" 
time="2017-03-24T09:16:04Z" level=error msg="Error response from daemon: Conflict. The container name \"/my-daemon\" is already in use by container 5e4f0937d15de47c3331b0b4c5c78c514fa7eaa31ea55e09735eac8c9ca72801. You have to remove (or rename) that container to be able to reuse that name." 

Hide "Checking containers for updated images" messages?

Is it possible to hide these log messages and only show the ones where it actually updates something?

At the moment I have to scroll through 100s of checking messages to get to useful info (using Portainer to check logs).

Docker Compose support

I don't know if you can do this or now, but I'd like to be able to specify the docker compose defined container name to watch, then have it do a rolling update on that. I could do this is regex matching or something, but I don't believe that's implemented. We can discuss this more more if you're interested.

ca-certs image broken, how to docker build ?

Hi,
I tried to build a docker image of my watchtower (that supports multiple networks, see #40 ) but when I start it, I get:

standard_init_linux.go:175: exec user process caused "no such file or directory"

If I put FROM: ubuntu instead of centurylink/ca-certs, it works.
What am I missing to build from ca-certs image?

Update data containers

Since data containers are not running, they are currently not supported.
Any chance they will be supported in the future?

Error response from daemon: Container cannot be disconnected from host network or connected to host network

Watchtower cannot restart containers after pulling image when network_mode is set to "host", however running manually sudo docker start <container_id> works fine.

docker-compose.yml:

  test:
    image: renshou/steamcmd
    container_name: test
    userns_mode: "host"
    network_mode: "host"
    tty: true
    restart: unless-stopped

watchtower log:

watchtower        | time="2017-03-24T10:05:58Z" level=info msg="Stopping /test (00b5fc60f4fd944acb578ada116a920d55c7961929db1b67189cc1c39435a375) with SIGTERM" 
watchtower        | time="2017-03-24T10:05:59Z" level=debug msg="Removing container 00b5fc60f4fd944acb578ada116a920d55c7961929db1b67189cc1c39435a375" 
watchtower        | time="2017-03-24T10:06:00Z" level=info msg="Creating /test" 
watchtower        | time="2017-03-24T10:06:00Z" level=error msg="Error response from daemon: Container cannot be disconnected from host network or connected to host network" 

Suggestion: Choose containers to restart based on container label

Currently, if I don't want all containers to be restarted when newer image versions are available, I have to specify a static list of container names when I run watchtower.

If additionally I could set a label on a container that I would like to be upgraded by watchtower, I would not have to manage restarting watchtower itself with new arguments each time I create a new container that I want auto-upgraded.

An option for staggered startup of new containers

We are running many JIRA and Confluence containers on a single host. When an update is found, watchtower pulls all updates, removes all containers and then creates new containers in short sequence.

Since all containers now start up at almost the same time, some of them fail to start correctly (plugin timeouts) because the underlying hardware cannot keep up with all the new processes.

It would be great to have an option for staggered startup, e.g. wait 30s before triggering the start of the next container.

What do you guys think?

Cheers,

Florian.

Suggestion: Add an option to not start the container again

My containers are managed by systemd on CoreOS and, thus, if watchtower were to stop one, it would be started again by systemd. This means that the container is stopped by watchtower, a new one is started once by watchtower, killed by systemd, and started again by systemd. I feel that a more reasonable approach to this would for watchtower to kill the container(s) and allow systemd to bring them back up.

Are App-Data retained during update?

The intro reads: Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially.
That's fine, but what about local App-Data created over time while the container was running and stored inside the container? Are those data retained as well?
I understand that data stored in mapped folders (external volumes) are untouched, but what about config and setting files stored inside the container itself ? Are they kept alive or lost?

Docker API version mismatch with DSM 6.1

Just tried the image under DSM 6.1:

when starting the container i get the error log:
Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.23
and the container quits of course.

Allow update "on demand" from another container

I have a continuous integration server running in a container on my host.

The continuous integration process produce docker images and publish them on Docker hub

Bases on these images, I have multiple container running on the same host, each one corresponding to a different state of my application (say, dev, test and prod, for the sake of the discussion). Given this, I can't use Watchtower on each of theses container (don't want to see my dev version pushed in prod).

What I would like is a way to ask Watchtower to update a given container from inside my CI container, if I link the watchtower container to my CI container.

Doesn't work when image from a private registry

For example I pull an image from "dev.server.com:5000/tom/website"
It then has the name "dev.server.com:5000/tom/website"

In the watchtower log it says

time="2016-02-02T15:47:06Z" level=info msg="Checking containers for updated images"
time="2016-02-02T15:47:06Z" level=debug msg="Retrieving running containers"
time="2016-02-02T15:47:06Z" level=debug msg="Pulling centurylink/watchtower:latest for /watchtower"
time="2016-02-02T15:47:07Z" level=debug msg="Pulling dev.server.com:5000/tom/website for /website"
Error: image tom/website: not found

Internal Server Error: cannot mount volume over existing file

Some of my containers can not be restarted by watchtower because of this error:

    level=error msg="500 Internal Server Error: cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/...

In fact the container setup overwrites existing files in the images by creating one file volumes in docker-compose.yml:

  ...
  volumes:
    - '/opt/dockervolumes/wordpress/var_www_html:/var/www/html'
    - '/etc/localtime:/etc/localtime'
    - '/etc/timezone:/etc/timezone'

But this has never been a problem since I've been using it. docker and docker-compose are able to handle this well.

What's the difference about watchtower? How to fix this?

Thank you very much.

Suggestion: Allow timeout value to be changed

[Premise]
Some of my containers require to shutdown gracefully because they have long tasks that might run for minutes before they can exit.
I haven't learned Go yet but reading your code especially the line at update.go#L13 I assume that it waits 10 seconds before forcefully killing the container in client.go#L106
[Actual request]
Would be it possible to add a parameter for allowing to change the timeout?
As an alternative I think just signalling the container without terminating it still through a parameter like --no-kill would work for me.
Thanks in advance.

Environment variable persistance

Hi,

Having setup watchtower, it worked perfectly - stopping containers, updating images & restarting images.

However, on restart all my containers were missing the environment variables which were specified when I setup the container. Examples include:
-e PUID=1033
-e PGID=65536
-e TZ=Europe/London \

Is this a known issue or something strange with my setup?

Thanks

Nick

Fix dependencies of watchtower

In order to provide deterministic builds and versions, the dependencies used should be fixed with a go vendoring tool.

glide seems to be really good.

Stop working after Error: image not found

After watchtower tries to pull an image that is not able to find (for example an image locally builded) it is not able to go on scanning the following images in the list.

So in the log I have

time="2016-12-04T22:34:24Z" level=info msg="Checking containers for updated images"
time="2016-12-04T22:34:24Z" level=debug msg="Retrieving running containers"
time="2016-12-04T22:33:41Z" level=debug msg="Pulling localimage:latest for /test-container"
Error: image library/localimage:latest not found
time="2016-12-04T23:24:24Z" level=info msg="Checking containers for updated images"

Allow logging output to use JSON formatter

We use FluentD to collate logs from our containers automatically.

It'd be useful if the watchtower logging could use the logrus JSON formatter built into its library;

log.SetFormatter(&log.JSONFormatter{})

Suggestion: maintenance window for updates

Some of us without high availability service setups would prefer to keep our restarts / disruptions within scheduled maintenance windows. Being able to specify a time range to do updates in (or equivalently, a time range to not do updates in) would be helpful in this regard.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.