IHello!
I am trying out dagger in k8s and have installed from the helm chart and included config to use docker mirror. Our mirror is plain http and insecure. I am using this config:
data:
engine.toml: |
debug = true
insecure-entitlements = ["security.insecure"]
[registry."docker.io"]
mirrors = ["registry-mirror.mycompany.local"]
http = true
insecure = true
I then try to confirm that the mirror is being used by this command:
dagger query --progress=plain <<< '{ container { from(address:"hello-world") { } } }' -vv
In the output I get this:
...
27 : HTTP HEAD
27 : HTTP HEAD ERROR [0.1s]
27 : ! tls: failed to verify certificate: x509: certificate is valid for xxxx, not registry-mirror.mycompany.local
26 : remotes.docker.resolver.HTTPRequest ERROR [0.1s]
26 : ! tls: failed to verify certificate: x509: certificate is valid for xxx, not registry-mirror.mycompany.local
28 : remotes.docker.resolver.HTTPRequest
29 : HTTP HEAD
29 : HTTP HEAD ERROR [0.5s]
28 : remotes.docker.resolver.HTTPRequest ERROR [0.5s]
30 : HTTP GET
30 : HTTP GET DONE [0.4s]
31 : remotes.docker.resolver.HTTPRequest
32 : HTTP HEAD
32 : HTTP HEAD DONE [0.1s]
31 : remotes.docker.resolver.HTTPRequest DONE [0.1s]
25 : resolving docker.io/library/node:20-alpine@sha256:df01469346db2bf1cfc1f7261aeab86b2960efa840fe2bd46d83ff339f463665 DONE [1.1s]
24 : Container.from DONE [1.1s]
23 : Directory.withDirectory DONE [1.1s]
22 : generatedCode DONE [1.1s]
...
It seems to me it is falling back to using docker hub instead of the mirror because it tries with HTTPS/TLS even though the config says plain HTTP.
If I put an invalid mirror address then I get an error that it does not exist, so the mirror config is obviously being consumed.
Is there some more config I need in order to use a plain HTTP registry mirrror?