forked from muzi502/registry-mirrors
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
199 lines (193 loc) · 5.46 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
services:
redis:
cap_drop:
- ALL
command:
- --maxmemory
- 128mb
- --maxmemory-policy
- allkeys-lru
container_name: mirror-redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
image: cgr.dev/chainguard/redis:latest
init: true
pull_policy: always
read_only: false
restart: always
sysctls:
# mitigate TIME-WAIT Assassination hazards in TCP
- net.ipv4.tcp_rfc1337=1
# SACK is commonly exploited and rarely used
- net.ipv4.tcp_sack=0
- net.ipv4.tcp_dsack=0
- net.ipv4.tcp_fack=0
# SSR could impact TCP's performance on a fixed-speed network (e.g., wired)
- net.ipv4.tcp_slow_start_after_idle=0
volumes:
- 'redis_data:/bitnami/redis/data'
gcr-registry:
cap_drop:
- ALL
container_name: mirror-gcr-registry
depends_on:
redis:
condition: service_started
restart: true
environment:
- REGISTRY_PROXY_REMOTEURL=https://gcr.io
image: icecodexi/registry:latest
init: true
labels:
- "com.centurylinklabs.watchtower.depends-on=mirror-redis"
pull_policy: always
read_only: false
restart: always
sysctls:
# mitigate TIME-WAIT Assassination hazards in TCP
- net.ipv4.tcp_rfc1337=1
# SACK is commonly exploited and rarely used
- net.ipv4.tcp_sack=0
- net.ipv4.tcp_dsack=0
- net.ipv4.tcp_fack=0
# SSR could impact TCP's performance on a fixed-speed network (e.g., wired)
- net.ipv4.tcp_slow_start_after_idle=0
volumes:
- ./config.yml:/etc/docker/registry/config.yml:ro
- ./data:/var/lib/registry
k8s-registry:
cap_drop:
- ALL
container_name: mirror-gcr-registry
depends_on:
redis:
condition: service_started
restart: true
environment:
- REGISTRY_PROXY_REMOTEURL=https://registry.k8s.io
image: icecodexi/registry:latest
init: true
labels:
- "com.centurylinklabs.watchtower.depends-on=mirror-redis"
pull_policy: always
read_only: false
restart: always
sysctls:
# mitigate TIME-WAIT Assassination hazards in TCP
- net.ipv4.tcp_rfc1337=1
# SACK is commonly exploited and rarely used
- net.ipv4.tcp_sack=0
- net.ipv4.tcp_dsack=0
- net.ipv4.tcp_fack=0
# SSR could impact TCP's performance on a fixed-speed network (e.g., wired)
- net.ipv4.tcp_slow_start_after_idle=0
volumes:
- ./config.yml:/etc/docker/registry/config.yml:ro
- ./data:/var/lib/registry
docker-registry:
cap_drop:
- ALL
container_name: mirror-hub-registry
depends_on:
redis:
condition: service_started
restart: true
environment:
- REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io
image: icecodexi/registry:latest
init: true
labels:
- "com.centurylinklabs.watchtower.depends-on=mirror-redis"
ports:
- "127.0.0.1:5000:5000"
pull_policy: always
read_only: false
restart: always
sysctls:
# mitigate TIME-WAIT Assassination hazards in TCP
- net.ipv4.tcp_rfc1337=1
# SACK is commonly exploited and rarely used
- net.ipv4.tcp_sack=0
- net.ipv4.tcp_dsack=0
- net.ipv4.tcp_fack=0
# SSR could impact TCP's performance on a fixed-speed network (e.g., wired)
- net.ipv4.tcp_slow_start_after_idle=0
volumes:
- ./config.yml:/etc/docker/registry/config.yml:ro
- ./data:/var/lib/registry
quay-registry:
cap_drop:
- ALL
container_name: mirror-quay-registry
depends_on:
redis:
condition: service_started
restart: true
environment:
- REGISTRY_PROXY_REMOTEURL=https://quay.io
image: icecodexi/registry:latest
init: true
labels:
- "com.centurylinklabs.watchtower.depends-on=mirror-redis"
pull_policy: always
read_only: false
restart: always
sysctls:
# mitigate TIME-WAIT Assassination hazards in TCP
- net.ipv4.tcp_rfc1337=1
# SACK is commonly exploited and rarely used
- net.ipv4.tcp_sack=0
- net.ipv4.tcp_dsack=0
- net.ipv4.tcp_fack=0
# SSR could impact TCP's performance on a fixed-speed network (e.g., wired)
- net.ipv4.tcp_slow_start_after_idle=0
volumes:
- ./config.yml:/etc/docker/registry/config.yml:ro
- ./data:/var/lib/registry
caddy:
cap_add:
- NET_BIND_SERVICE
cap_drop:
- ALL
container_name: mirror-caddy
image: icecodexi/caddy:cfdns
init: true
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
pull_policy: always
read_only: false
restart: always
sysctls:
# mitigate TIME-WAIT Assassination hazards in TCP
- net.ipv4.tcp_rfc1337=1
# SACK is commonly exploited and rarely used
- net.ipv4.tcp_sack=0
- net.ipv4.tcp_dsack=0
- net.ipv4.tcp_fack=0
# SSR could impact TCP's performance on a fixed-speed network (e.g., wired)
- net.ipv4.tcp_slow_start_after_idle=0
ulimits:
nproc: 16384
nofile:
soft: 16384
hard: 16384
memlock:
soft: 8192
hard: 16384
volumes:
- /usr/local/etc/caddy/:/usr/local/etc/caddy/
- type: bind
source: ./caddy/
target: /etc/caddy/
read_only: true
volumes:
redis_data:
driver: local