I am porting my applications to Docker and I am not sure how to handle cert / key management. In one host, I have two Docker containers that need to listen / transmit via TLS to several client machines. Before dockers, I had a single server key and a self-signed certificate, and my clients used a self-signed certificate to communicate with server applications.
But now that they are separated by docker containers, what is the correct methodology? Do I click certs / key on directories in the container? If so, then my docker file will need COPY cert / key, and I don't want the key to be part of the marked image. (Security)
Or am I using VOLUME and holding the / cert switch on the host machine? I tried this, but the root container user was not able to see the private key that was read only by the root user.
What is the really right way to do this? Thanks
source share