I’d like to share an idea to configure the Daemon with own or self signed certificates.
Most forum posts more or less state that we currently cannot use self signed certificates (see Running an insecure registry --insecure-registry or Private docker registry with self signed certificate). I wonder if it would make sense to manually copy them into the Hyper-V VM like this:
- (on your host)
move the certificates to a directory somewhere in
/Users/.... We’ll be able to copy files from there into the VM as it will already be mounted by Docker.
- (on your host) attach to the TTY:
- (inside the vm) copy the certificates into the vm:
mkdir -p /etc/docker/certs.d/mydomain.com:5000 && cp /Users/.../certs/domain.crt /etc/docker/certs.d/mydomain.com/ca.crt
- (inside the vm) restart Docker:
service docker restart
AFAIK changes inside the VM will be removed when restarting the Docker.app. But would the idea work in general? I only had some minutes to give it a try, but only with
CN=docker.local, which didn’t work, since it doesn’t seem to be resolved from inside the VM.
Any feedback is appreciated!