File tree 1 file changed +31
-4
lines changed
1 file changed +31
-4
lines changed Original file line number Diff line number Diff line change 1
1
services :
2
2
3
3
watchtower :
4
- image : containrrr/watchtower:latest
4
+ image : containrrr/watchtower:latest
5
5
container_name : watchtower
6
6
hostname : watchtower
7
7
environment :
@@ -16,11 +16,38 @@ services:
16
16
# - WATCHTOWER_MONITOR_ONLY=true
17
17
- WATCHTOWER_SCHEDULE=0 0 6 * * * # requires a go cron syntax of 6 space-separated fields; see https://containrrr.dev/watchtower/arguments/#scheduling
18
18
- WATCHTOWER_CLEANUP=true # remove unused images afterwards
19
+ - DOCKER_HOST=tcp://socket-proxy:2375 # use socket-proxy for secure docker api access
19
20
restart : always
20
- network_mode : " host"
21
+ networks :
22
+ - watchtower
23
+ - proxynet
21
24
volumes :
22
25
- /etc/localtime:/etc/localtime:ro
23
- - /var/run/docker.sock:/var/run/docker.sock:ro
24
26
working_dir : /
25
27
labels :
26
- com.centurylinklabs.watchtower : true
28
+ com.centurylinklabs.watchtower : true
29
+
30
+ socket-proxy :
31
+ image : lscr.io/linuxserver/socket-proxy:1.26.2
32
+ container_name : socket-proxy-watchtower
33
+ environment :
34
+ - ALLOW_START=1
35
+ - ALLOW_STOP=1
36
+ - ALLOW_RESTARTS=1
37
+ - CONTAINERS=1
38
+ - IMAGES=1
39
+ - NETWORKS=1
40
+ - POST=1
41
+ volumes :
42
+ - /var/run/docker.sock:/var/run/docker.sock:ro
43
+ networks :
44
+ - proxynet
45
+ restart : always
46
+ read_only : true
47
+ tmpfs :
48
+ - /run
49
+
50
+ networks :
51
+ proxynet :
52
+ internal : true
53
+ watchtower :
You can’t perform that action at this time.
0 commit comments