see https://forums.docker.com/t/adding-self-signed-certificates/9761.
- create certificates (see create-certs.sh)
- 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. - attach to the TTY:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
- 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
- restart Docker:
service docker restart