How to connect to private registry via SSL?
Since Boot2Docker is now deprecated and you are encouraged to use docker-machine instead, I ask myself how to add a certificate from my private docker registry. My usual way of doing it was to add the cert to /etc/certs.d/
Since boot2docker save is no more: How is this meant to be accomplished now?
Cheers, Christian
cc @tianon @SvenDowideit @ehazlett for discussion and recommendations
+1 waiting for a solution or a workaround..
Here is a hack to make it work until a better solution arrives. Note that the cert should be base64 encoded.
docker-machine.exe scp ca.crt default:.
docker-machine.exe ssh default
sudo mkdir -p /etc/docker/certs.d/<fully-qualified-host-name>
sudo mv ca.crt /etc/docker/certs.d/<fully-qualified-host-name>/ca.crt
Isn't /var/lib/boot2docker/certs set up in the VM on the persistent storage specifically for this right now? ie, https://github.com/boot2docker/boot2docker/blob/30800b21799f3aedba2150c729aeafc13baad8d9/rootfs/rootfs/etc/rc.d/install-ca-certs, which runs at boot
yup.
@tianon Sorry, don't get you?
Note to self: Add this to docs.
@christianhuening specifically, something like this seemed to work for me:
host$ docker-machine scp my-private-ca.pem my-machine-name:/tmp
host$ docker-machine ssh my-machine-name
docker$ sudo mkdir /var/lib/boot2docker/certs
docker$ sudo cp /tmp/my-private-ca.pem /var/lib/boot2docker/certs
docker$ exit
host$ docker-machine restart my-machine-name
@shepmaster Thanks! much appreciated!
@nathanleclaire maybe this issue could be repurposed as a note to add the info to the docs as appropriate?
Yeah, I think I will add one.