Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Specify a self-signed CA Certificate #140

Merged
merged 1 commit into from
Jul 10, 2017
Merged

Specify a self-signed CA Certificate #140

merged 1 commit into from
Jul 10, 2017

Conversation

lingrino
Copy link
Contributor

@lingrino lingrino commented Jul 5, 2017

This PR lets anyone pass a self-signed certificate as a runtime environment variable using CUSTOM_CA_CERT. This is a much better solution than ignoring TLS rejections.

Previously this could only be accomplished by building your child image, copying the cert, and specifying NODE_EXTRA_CA_CERTS. With this PR users won't have to build and host their own images just to use a self-signed CA.

I also updated the Dockerfile to use an ENTRYPOINT instead of CMD, based on the best practices guide. This lets you start the app by default, but easily pass /bin/sh or any other command to docker run instead. It also lets us trust the CA cert before starting the app.

Let me know any thoughts/feedback. Thanks.

@djenriquez
Copy link
Owner

Impressive @lingrino, I'm very surprised at how simple this looks. Thanks for cleaning up the Dockerfile also!

I'll take a deeper look into this tonight (flying back in from vacation today) and if it works great, as I assume it does, we'll get it merged in.

Thanks for this!

@djenriquez
Copy link
Owner

@lingrino Looks good!

Referencing NODE_EXTRA_CA_CERTS

@stephansnyt this should take care of #97 as well.

@djenriquez djenriquez merged commit feae525 into djenriquez:master Jul 10, 2017
@lingrino
Copy link
Contributor Author

@djenriquez Thanks! Glad I could contribute.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants