-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker daemon needs restart to handle system ca change (i.e. internal registry) #39869
Comments
|
Most probably but this require an additional configuration to the docket daemon.
We would like to avoid this and rationalize that system certificate (where our CA is needed for other purposes) should be equivalent.
|
FYI Not a bug: |
Ignoring wrappers like |
You can do something like this to get around the inconsistencies in dockerd
(good and ugly, but works...) |
Note that (since #22446), |
It does not reload them. You can reload certs in certs.d but the code treats both differently. The problem with that is neither are "static" so-to-speak files. |
Go will not reload the system cert pool since it is populated through a sync.Once. |
The TLS server config in Docker daemon is returned with static Lines 577 to 588 in 76016b8
If the TLS config was extended with dynamic |
That config is not related to registries, it is for auth over a TCP socket for admins. |
Yes, so this is the Go runtime that doesn't support it (as it's using a I see there's a ticket there with a proposal to provide an API for reloading; golang/go#41888, and a pull request / patch, but it's not been accepted / reviewed yet; https://golang.org/cl/327069 |
Description
We have setup a internal registry which uses a private key infrastucture: the certificate authority is internal.
We have installed the CA in the linux client and reloaded docker configuration with systemd but still get
x509: certificate signed by unknown authority
After rebooting the full linux (bazooka solution) this works.
So i guess docker doesn't reload system certificates on reload
Steps to reproduce the issue:
I am on debian.
The hostname and port of the internal registry have been edited.
> docker login registry.local:5000 Username: cblomart Password: Error response from daemon: Get https://registry.local:5000/v2/: x509: certificate signed by unknown authority
> sudo systemctl reload docker
> docker login registry.local:5000 Username: cblomart Password: Error response from daemon: Get https://registry.local:5000/v2/: x509: certificate signed by unknown authority
> sudo systemctl restart docker
> docker login registry.local:5000 Username: cblomart Password:
Describe the results you received:
CA is taken into account only after a restart of docker.
Otherwise:
x509: certificate signed by unknown authority
Describe the results you expected:
I would have expected that docker takes into account the system certs without reload or restart.
I would have expected that a reload was suffisient to reload the system certificate.
I have an issue restarting my docker daemons to reload certificates for the internal registry
Output of
docker version
:The text was updated successfully, but these errors were encountered: