Repository navigation
build: upgrade certifi, pip and Node.js - #133
Conversation
Stop trusting the compromised eMudhra/emSign CA certificates: https://emudhra.we-have-a-problem.com/ Part of: overhangio/tutor#1515 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| RUN pip install nodeenv==1.9.1 | ||
| # nodejs version picked from https://github.com/openedx/course-discovery/blob/master/Dockerfile | ||
| RUN nodeenv /openedx/nodeenv --node=16.14.2 --prebuilt | ||
| RUN nodeenv /openedx/nodeenv --node=24.22.1 --prebuilt |
There was a problem hiding this comment.
The image doesn't build with this change. Once node is on 24, make static fails:
#27 17.04 ERROR in ../../node_modules/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2
#27 17.04 Module build failed (from ../../node_modules/url-loader/dist/cjs.js):
#27 17.04 Error: error:0308010C:digital envelope routines::unsupported
#27 17.04 at new Hash (node:internal/crypto/hash:143:21)
#27 17.04 at Object.createHash (node:crypto:151:10)
#27 17.04 at getHashDigest (/openedx/discovery/node_modules/file-loader/node_modules/loader-utils/lib/getHashDigest.js:46:34)
#27 17.04 webpack 5.94.0 compiled with 6 errors in 13193 ms
#27 17.27 make: *** [Makefile:19: static] Error 1
course-discovery's webpack config uses [hash] in its file-loader/url-loader names, and the loader-utils bundled with file-loader hashes that with md4, which node 17+ (OpenSSL 3) no longer allows by default. Going back to node 16 isn't an option since it's EOL and never got the fixed CA store, so I'd enable the legacy provider only for the asset build:
RUN NODE_OPTIONS=--openssl-legacy-provider DJANGO_SETTINGS_MODULE=course_discovery.settings.assets make staticI built it locally with just that line changed: webpack compiles fine, bower install works on node 24 as well, pip check is clean, and in the resulting image python (system store, certifi and requests), curl and node all reject the chains from https://emudhra.we-have-a-problem.com/.
The webpack version used by course-discovery hashes with MD4, which OpenSSL 3 only provides through its legacy provider on Node.js 17+. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
5878106 to
fb6931f
Compare
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8eb8ed8 to
bbcd912
Compare
Part of: overhangio/tutor#1515
🤖 Generated with Claude Code