Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow injection of SSL certificates or use npm set strict-ssl false as fallback #96

Open
stiller-leser opened this issue Mar 6, 2018 · 1 comment

Comments

@stiller-leser
Copy link

stiller-leser commented Mar 6, 2018

My own Git is protected by some custom SSL certificate. If I run

docker run -it --rm --privileged -v `pwd`:/root/ \                                                                             
           projectatomic/dockerfile-lint \
           dockerfile_lint -f 'https://my-github-repository/blob/master/Dockerfile'

npm is complaining about it not being able to verify the SSL certificate. Hence it would be nice if I could either inject SSL certificates, run a npm set strict-ssl false as fallback before the dockerfile_lint or having the work done in this PR fallback to an insecure HTTPS automatically. I could of course build my own image, but I imagine that I am not the only one with this usecase.

@stiller-leser
Copy link
Author

Made it work by using:

docker run -it --rm --privileged projectatomic/dockerfile-lint \
/bin/bash -c "yum install -y -q wget && update-ca-trust force-enable &&\
wget -q 'path/to/my/ca.crt' -O '/etc/pki/ca-trust/source/anchors/ca.crt' &&\
update-ca-trust extract &&\
dockerfile_lint -f 'path/to/my/dockerfile'" 

That seems overly complicated though - even though now it is more secure. Leaving the issue open for discussion.

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

No branches or pull requests

1 participant