@@ -58,10 +58,12 @@ Before doing so, you'll need to:
58
58
59
59
1 . Create a file named ` hub.txt ` in your home directory.
60
60
2 . Set the ` USERNAME ` variable to your Docker Hub username.
61
+ 3 . If you're using cloud-hypervisor, set the ` BRIDGE ` variable to ` 192.168.129.1 `
61
62
62
63
``` bash
63
64
export USERNAME=" "
64
65
export TOKEN=$( cat ~ /hub.txt)
66
+ export BRIDGE=" 192.168.128.1"
65
67
66
68
cat >> /tmp/registry.yml << EOF
67
69
version: 0.1
@@ -83,14 +85,20 @@ proxy:
83
85
password: $TOKEN
84
86
85
87
http:
86
- addr: 192.168.128.1 :5000
88
+ addr: $BRIDGE :5000
87
89
relativeurls: false
88
90
draintimeout: 60s
89
- EOF
90
91
91
- sudo mv /tmp/registry.yml /etc/registry/config.yml
92
+ # Enable self-signed TLS from the TLS certificate and key
93
+ # managed by actuated for server <> microVM communication
94
+ tls:
95
+ certificate: /var/lib/actuated/certs/server.crt
96
+ key: /var/lib/actuated/certs/server.key
97
+ EOF
92
98
```
93
99
100
+ As the certificate is expired, actuated will automatically restart the ` registry ` service to use the new certificate.
101
+
94
102
Install and start the registry with a systemd unit file:
95
103
96
104
``` bash
140
148
141
149
jobs :
142
150
build :
143
- runs-on : [actuated]
151
+ runs-on : [actuated-4cpu-8gb ]
144
152
steps :
145
153
146
154
- name : Setup mirror
@@ -167,10 +175,17 @@ find /var/lib/registry/ -name "alpine"
167
175
/var/lib/registry/docker/registry/v2/repositories/library/alpine
168
176
```
169
177
178
+ Add actuated's bridge <> VM CA bundle to the trust store on the server, to test the registry via curl:
179
+
180
+ ``` bash
181
+ sudo cp /var/lib/actuated/certs/ca.crt /usr/local/share/ca-certificates/actuated-ca.crt
182
+ sudo update-ca-certificates
183
+ ```
184
+
170
185
You can also use the registry's API to query which images are available:
171
186
172
187
``` bash
173
- curl -i http ://192.168.128.1:5000/v2/_catalog
188
+ curl -i https ://192.168.128.1:5000/v2/_catalog
174
189
175
190
HTTP/1.1 200 OK
176
191
Content-Type: application/json; charset=utf-8
0 commit comments