Editing
Docker and Self-Signed Certificates
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
While it is possible to tell docker to ignore the fact that a registry is using self-signed certificates, it is just as easy to put the certificates in a place on the client system where docker can use them to authenticate the server as it likes to do. Assuming that the registry's self-signed certificates were created as described [[Creating a Self-Signed Certificate|here]], you have the certificate in a files called ''cert.pem'' and the key in a file called ''key.pem''. The <hostname> used in the commands below must match '''''EXACTLY''''' the hostname provided when creating the keys. Docker allows local certificates to be placed in a directory on the client called ''/etc/docker/certs.d''. The contents of this directory are a set of subdirectories -- one for each system to be authenticated -- that contain the cert/key files for that system. Using the certificate created above, issue these commands: sudo mkdir -p /etc/docker/certs.d/<hostname> sudo cp cert.pem /etc/docker/certs.d/<hostname>/domain.crt sudo cp cert.pem /etc/docker/certs.d/<hostname>/ca.crt sudo cp key.pem /etc/docker/certs.d/<hostname>/domain.key This must be done on any system that will be accessing the registry. Alternatively, the entire <hostname> subdirectly can be copied to the other systems using scp: sudo scp -r /etc/docker/certs.d/<hostname> <client-hostname>:/etc/docker/certs.d
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information