2019-03-27新增
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt
(Solved) How to add your own self-signed certs to Docker for Mac (no more x509)
FINALLY figured out how to deal with Self Signed certs in docker for mac
1) Open the CLI mode:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
2) Login as root (no password)
3) download custom certs
wget http://happytime.org/custom.crt
cat custom.crt >> /etc/ssl/certs/ca-certificates.crt
4) Restart the docker deamon
/etc/init.d/docker restart