Merge "Fix for docker image create behind a proxy with custom CA certs"

This commit is contained in:
Zuul 2020-07-10 15:25:35 +00:00 committed by Gerrit Code Review
commit 308daa9650
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,12 @@ if [[ ! -d $tools_bin_dir/node-$node_version ]]; then
# npm requires node to also be on the path
export PATH=$(realpath $tools_bin_dir)/node-$node_version/bin:$PATH
# Proxy / SSL issues when using custom CAs with proxy / self signed certs.
# This assumes the system certs are up to date and is on linux or in docker
if [ -r /etc/ssl/certs/ca-certificates.crt ]; then
export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
fi
# npm will write to a node_modules even with the --directory flag it's better to be in the root of where you want this to live
cd web
npm config set user ${npm_user}