optimize repeated image builds
fix cached gem installation
added CA_CERTIFICATES_PATH configuration option