Created
March 3, 2015 10:37
-
-
Save id/408b45ee8146fe578cda to your computer and use it in GitHub Desktop.
Adding CA into boot2docker vm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osx-host$ boot2docker ssh | |
sudo su - | |
cd /var/lib/boot2docker/ | |
cat <<EOF >bootlocal.sh | |
#!/bin/sh | |
cp /Users/ivan.dyachkov/MyCA.crt /usr/local/share/ca-certificates/ | |
CERT=/usr/local/share/ca-certificates/MyCA.crt | |
HASH=$(openssl x509 -hash -in $CERT | head -n1) | |
ln -s $CERT /etc/ssl/certs/$HASH.0 | |
grep -q $(head -2 $CERT | tail -1) /etc/ssl/certs/ca-certificates.crt || cat $CERT >> /etc/ssl/certs/ca-certificates.crt | |
EOF | |
chmod +x bootlocal.sh |
This will survive boot2docker VM restart, however, you'll have to repeat this after recreating vm.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace MyCa.crt and "ivan.dyachkov" with your data.