dockerfile_lint
dockerfile_lint copied to clipboard
Allow injection of SSL certificates or use npm set strict-ssl false as fallback
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.
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.