dockerfile_lint icon indicating copy to clipboard operation
dockerfile_lint copied to clipboard

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

Open stiller-leser opened this issue 6 years ago • 1 comments

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 avatar Mar 06 '18 09:03 stiller-leser

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.

stiller-leser avatar Mar 06 '18 10:03 stiller-leser