Netflix / lemur-docker

Docker files for the Lemur certificate orchestration tool
170 stars 88 forks source link

Build process is failing #67

Closed neilschelly closed 11 months ago

neilschelly commented 2 years ago

When getting to the make build_containers part of the build, I get the following errors:

Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
npm ERR! code EINTEGRITY
npm ERR! sha512-rPiiYY4t8pqK1rCDQy1bE6HRR63B2RwfYsIVc1/BNkeIilvqZMwGeTksSBK8WTozBz8c/tMd7jk0c4Q4f/F+UA== integrity checksum failed when using sha512: wanted sha512-rPiiYY4t8pqK1rCDQy1bE6HRR63B2RwfYsIVc1/BNkeIilvqZMwGeTksSBK8WTozBz8c/tMd7jk0c4Q4f/F+UA== but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==. (0 bytes)                                                           
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm WARN notsup Unsupported engine for npm@8.1.0: wanted: {"node":"^12.13.0 || ^14.15.0 || >=16"} (current: {"node":"10.19.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: npm@8.1.0                                                                       

+ npm@8.1.0
added 220 packages from 96 contributors in 4.319s
npm ERR! Callback called more than once.

npm ERR! A complete log of this run can be found in:                                                                                          
npm ERR!     /root/.npm/_logs/2021-10-20T01_47_32_744Z-debug.log                                                                              
The command '/bin/sh -c apt-get update &&     apt-get -y --no-install-recommends upgrade &&     apt-get install -y --no-install-recommends libpq-dev curl build-essential locales libffi-dev libsasl2-dev libldap2-dev         dh-autoreconf git python3-dev python3-pip python3-venv python3-wheel nodejs npm &&     locale-gen en_US.UTF-8 && export LC_ALL=en_US.UTF-8 &&     npm config set registry http://registry.npmjs.org/ &&     npm install npm -g &&     echo "NPM INSTALL NPM DONE" &&     echo "Running with nodejs:" && node -v &&     python3 -m venv /opt/venv &&     echo "Running with python:" && /opt/venv/bin/python3 -c 'import platform; print(platform.python_version())' &&     /opt/venv/bin/python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel &&     /opt/venv/bin/python3 -m pip install --no-cache-dir -e . &&     npm install --unsafe-perm &&     node_modules/.bin/gulp --cwd /opt/lemur build &&     node_modules/.bin/gulp --cwd /opt/lemur package &&     npm cache clean --force &&     rm -rf node_modules &&     python3 -c 'print(" \033[32m BUILDER DONE \033[0m ")'' returned a non-zero code: 1
ERROR: Service 'lemur' failed to build : Build failed

The contents of that log file will be something like:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'npm@latest', '-g' ]
2 info using npm@6.14.4
3 info using node@v10.19.0
4 verbose npm-session 5541963c05347323
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/npm 2489ms
8 verbose stack Error: sha512-rPiiYY4t8pqK1rCDQy1bE6HRR63B2RwfYsIVc1/BNkeIilvqZMwGeTksSBK8WTozBz8c/tMd7jk0c4Q4f/F+UA== integrity checksum failed when using sha512: wanted sha512-rPiiYY4t8pqK1rCDQy1bE6HRR63B2RwfYsIVc1/BNkeIilvqZMwGeTksSBK8WTozBz8c/tMd7jk0c4Q4f/F+UA== but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==. (0 bytes)
8 verbose stack     at IntegrityStream.[_onEnd] (/usr/share/nodejs/ssri/index.js:86:19)
8 verbose stack     at IntegrityStream.emit (/usr/share/nodejs/ssri/index.js:59:35)
8 verbose stack     at IntegrityStream.[maybeEmitEnd] (/usr/share/nodejs/ssri/node_modules/minipass/index.js:350:12)
8 verbose stack     at IntegrityStream.end (/usr/share/nodejs/ssri/node_modules/minipass/index.js:230:27)
8 verbose stack     at PassThrough.onend (_stream_readable.js:672:10)
8 verbose stack     at Object.onceWrapper (events.js:286:20)
8 verbose stack     at PassThrough.emit (events.js:198:13)
8 verbose stack     at endReadableNT (_stream_readable.js:1145:12)
8 verbose stack     at process._tickCallback (internal/process/next_tick.js:63:19)
9 verbose cwd /opt/lemur
10 verbose Linux 5.14.0-11.1-liquorix-amd64
11 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "npm@latest" "-g"
12 verbose node v10.19.0
13 verbose npm  v6.14.4
14 error code EINTEGRITY
15 error sha512-rPiiYY4t8pqK1rCDQy1bE6HRR63B2RwfYsIVc1/BNkeIilvqZMwGeTksSBK8WTozBz8c/tMd7jk0c4Q4f/F+UA== integrity checksum failed when using sha512: wanted sha512-rPiiYY4t8pqK1rCDQy1bE6HRR63B2RwfYsIVc1/BNkeIilvqZMwGeTksSBK8WTozBz8c/tMd7jk0c4Q4f/F+UA== but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==. (0 bytes)
16 verbose exit [ 1, true ]

I eventually found the following error through some manual tinkering:

69 silly audit error Beginning October 4, 2021, all connections to npm websites and the npm registry - including for package installation - must use HTTPS and TLS 1.2 or higher.

I was able to get it to build by modifying the Dockerfile and instructing it to use the https variation of the registry.npmjs.org URL: npm config set registry https://registry.npmjs.org/

I'll make a PR for that in a few.