rebased/mergable copy of "Add https cert and key options to docker"

This is a mergable copy of #2186