Previous Page

root@Datura - 2024-01-16

watchtower Setup

In this tutorial we'll setup a watchtower container, used to upgrade all all docker images automatically

Initial Setup

First install the required packages:


apt install docker.io docker-compose
	


[ Datura-Network ] [ /dev/pts/4 ] [/srv/watchtower]
→ vim docker-compose.yml

[ Datura-Network ] [ /dev/pts/4 ] [/srv/watchtower]
→ cat docker-compose.yml
version: "3"
services:
  watchtower:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

[ Datura-Network ] [ /dev/pts/4 ] [/srv/watchtower]
→ docker-compose up

Creating network "watchtower_default" with the default driver
Pulling watchtower (containrrr/watchtower:)...
latest: Pulling from containrrr/watchtower
57241801ebfd: Pull complete
3d4f475b92a2: Pull complete
1f05004da6d7: Pull complete
Digest: sha256:6dd50763bbd632a83cb154d5451700530d1e44200b268a4e9488fefdfcf2b038
Status: Downloaded newer image for containrrr/watchtower:latest
Creating watchtower_watchtower_1 ... done
Attaching to watchtower_watchtower_1
watchtower_1  | time="2024-01-16T17:35:57Z" level=info msg="Watchtower 1.7.1"
watchtower_1  | time="2024-01-16T17:35:57Z" level=info msg="Using no notifications"
watchtower_1  | time="2024-01-16T17:35:57Z" level=info msg="Checking all containers (except explicitly disabled with label)"
watchtower_1  | time="2024-01-16T17:35:57Z" level=info msg="Scheduling first run: 2024-01-17 17:35:57 +0000 UTC"
watchtower_1  | time="2024-01-16T17:35:57Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"


[ Datura-Network ] [ /dev/pts/4 ] [/srv/watchtower]
→ cat docker-compose.yml
version: "3"
services:
  watchtower:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --interval 30

[ Datura-Network ] [ /dev/pts/4 ] [/srv/watchtower]
→ docker-compose up
Recreating watchtower_watchtower_1 ... done
Attaching to watchtower_watchtower_1
watchtower_1  | time="2024-01-16T17:38:14Z" level=info msg="Watchtower 1.7.1"
watchtower_1  | time="2024-01-16T17:38:14Z" level=info msg="Using no notifications"
watchtower_1  | time="2024-01-16T17:38:14Z" level=info msg="Checking all containers (except explicitly disabled with label)"
watchtower_1  | time="2024-01-16T17:38:14Z" level=info msg="Scheduling first run: 2024-01-16 17:38:44 +0000 UTC"
watchtower_1  | time="2024-01-16T17:38:14Z" level=info msg="Note that the first check will be performed in 29 seconds"
watchtower_1  | time="2024-01-16T17:38:52Z" level=info msg="Found new matrixdotorg/synapse:latest image (73ab629ff922)"
watchtower_1  | time="2024-01-16T17:39:02Z" level=info msg="Found new awesometechnologies/synapse-admin:latest image (0170f12af3da)"
watchtower_1  | time="2024-01-16T17:39:05Z" level=warning msg="Could not do a head request for \"wikiless_wikiless:latest\", falling back to regular pull." container=/wikiless image="wikiless_wikiless:latest"
watchtower_1  | time="2024-01-16T17:39:05Z" level=warning msg="Reason: registry responded to head request with \"401 Unauthorized\", auth: \"Bearer realm=\\\"https://auth.docker.io/token\\\",service=\\\"registry.docker.io\\\",scope=\\\"repository:library/wikiless_wikiless:pull\\\",error=\\\"insufficient_scope\\\"\"" container=/wikiless image="wikiless_wikiless:latest"
watchtower_1  | time="2024-01-16T17:39:06Z" level=info msg="Unable to update container \"/wikiless\": Error response from daemon: pull access denied for wikiless_wikiless, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. Proceeding to next."
watchtower_1  | time="2024-01-16T17:39:20Z" level=info msg="Found new redis:latest image (bdff4838c172)"
watchtower_1  | time="2024-01-16T17:39:29Z" level=info msg="Found new quay.io/prometheus/node-exporter:latest image (72c9c2088986)"
watchtower_1  | time="2024-01-16T17:39:32Z" level=info msg="Found new zedeus/nitter:latest image (6f530b12032e)"
watchtower_1  | time="2024-01-16T17:39:41Z" level=info msg="Found new redis:6-alpine image (0e8d64a9df81)"
watchtower_1  | time="2024-01-16T17:39:52Z" level=info msg="Found new louislam/uptime-kuma:1 image (b23ac695b1b4)"
watchtower_1  | time="2024-01-16T17:39:53Z" level=warning msg="Could not do a head request for \"anonymousoverflow_anonymousoverflow:latest\", falling back to regular pull." container=/app image="anonymousoverflow_anonymousoverflow:latest"
watchtower_1  | time="2024-01-16T17:39:53Z" level=warning msg="Reason: registry responded to head request with \"401 Unauthorized\", auth: \"Bearer realm=\\\"https://auth.docker.io/token\\\",service=\\\"registry.docker.io\\\",scope=\\\"repository:library/anonymousoverflow_anonymousoverflow:pull\\\",error=\\\"insufficient_scope\\\"\"" container=/app image="anonymousoverflow_anonymousoverflow:latest"
watchtower_1  | time="2024-01-16T17:39:54Z" level=info msg="Unable to update container \"/app\": Error response from daemon: pull access denied for anonymousoverflow_anonymousoverflow, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. Proceeding to next."
watchtower_1  | time="2024-01-16T17:39:54Z" level=info msg="Stopping /uptime-kuma (e5ebde3cd501) with SIGTERM"
watchtower_1  | time="2024-01-16T17:40:00Z" level=info msg="Stopping /nitter-redis (34c58ce5c039) with SIGTERM"
watchtower_1  | time="2024-01-16T17:40:01Z" level=info msg="Stopping /nitter (dd310e501e1d) with SIGTERM"
watchtower_1  | time="2024-01-16T17:40:12Z" level=info msg="Stopping /node_exporter (98e33d5e48f7) with SIGTERM"
watchtower_1  | time="2024-01-16T17:40:13Z" level=info msg="Stopping /wikiless-redis (feea75ea9847) with SIGTERM"
watchtower_1  | time="2024-01-16T17:40:14Z" level=info msg="Stopping /matrix_synapse-admin_1 (165f3f68cf72) with SIGTERM"
watchtower_1  | time="2024-01-16T17:40:15Z" level=info msg="Stopping /matrix_synapse (d6556988d78f) with SIGTERM"
watchtower_1  | time="2024-01-16T17:40:22Z" level=info msg="Creating /matrix_synapse"
watchtower_1  | time="2024-01-16T17:40:23Z" level=info msg="Creating /matrix_synapse-admin_1"
watchtower_1  | time="2024-01-16T17:40:23Z" level=info msg="Creating /wikiless-redis"
watchtower_1  | time="2024-01-16T17:40:23Z" level=info msg="Creating /node_exporter"
watchtower_1  | time="2024-01-16T17:40:24Z" level=info msg="Creating /nitter"
watchtower_1  | time="2024-01-16T17:40:24Z" level=info msg="Creating /nitter-redis"
watchtower_1  | time="2024-01-16T17:40:24Z" level=info msg="Creating /uptime-kuma"
watchtower_1  | time="2024-01-16T17:40:25Z" level=info msg="Session done" Failed=0 Scanned=21 Updated=7 notify=no

	

Nihilism

Until there is Nothing left.

About nihilist

Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8


Contact: nihilist@nihilism.network (PGP)