Dockerfile build error OpenSSL
-
I am getting this while making a custom package for a node/npm app (https://github.com/pawelmalak/snippet-box/) :
ERR_OSSL_EVP_UNSUPPORTED
My " developer friend" (aka ChatGPT ) says :
The error message you're encountering, "Error: error:0308010C:digital envelope routines::unsupported," is related to OpenSSL, and it indicates that there may be an issue with OpenSSL within the Docker container.
His (her?) suggestions don't fix it.
Can't see this mentioned in the forum.
Is it a base image issue, or anyone met it / fixed it ? -
Alternatively ..... maybe I am barking up wrong tree ... again ... what do you use for managing code snippets ?
A docs resource ?
A private wiki ?
Self-hosted Gitlab ? -
@timconsidine said in Dockerfile build error OpenSSL:
Alternatively ..... maybe I am barking up wrong tree ... again ... what do you use for managing code snippets ?
I don't, but I've mostly seen people share them on GitHub Gists https://gist.github.com/
So I'd guess the GitLab, Gitea etc would be your best bet (although at the same time I really don't want to discourage you from working on packaging more useful apps for Cloudron! )
-
@nebulon while building the image from the Dockerfile :
=> ERROR [ 9/16] RUN npm run build && mv ./client/build/* ./public 3.8s ------ > [ 9/16] RUN npm run build && mv ./client/build/* ./public: 0.630 0.630 > snippet-hub@1.0.0 build 0.630 > npm-run-all -n build:** 0.630 0.817 0.817 > snippet-hub@1.0.0 build:client /app/code/package.json 0.817 > npm run build --prefix=client 0.817 1.109 1.109 > snippet-hub@1.0.0 build:client 1.109 > npm run build --prefix=client 1.109 1.403 1.403 > client@0.1.0 build 1.403 > react-scripts build 1.403 3.141 Creating an optimized production build... 3.677 Error: error:0308010C:digital envelope routines::unsupported 3.677 at new Hash (node:internal/crypto/hash:71:19) 3.677 at Object.createHash (node:crypto:133:10) 3.677 at module.exports (/app/code/client/node_modules/webpack/lib/util/createHash.js:135:53) 3.677 at NormalModule._initBuildHash (/app/code/client/node_modules/webpack/lib/NormalModule.js:417:16) 3.677 at handleParseError (/app/code/client/node_modules/webpack/lib/NormalModule.js:471:10) 3.677 at /app/code/client/node_modules/webpack/lib/NormalModule.js:503:5 3.677 at /app/code/client/node_modules/webpack/lib/NormalModule.js:358:12 3.677 at /app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3 3.677 at iterateNormalLoaders (/app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10) 3.677 at iterateNormalLoaders (/app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:221:10) 3.677 at /app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:236:3 3.677 at runSyncOrAsync (/app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:130:11) 3.677 at iterateNormalLoaders (/app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:232:2) 3.677 at Array.<anonymous> (/app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:205:4) 3.677 at Storage.finished (/app/code/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) 3.677 at /app/code/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 3.691 /app/code/client/node_modules/react-scripts/scripts/build.js:19 3.691 throw err; 3.691 ^ 3.691 3.691 Error: error:0308010C:digital envelope routines::unsupported 3.691 at new Hash (node:internal/crypto/hash:71:19) 3.691 at Object.createHash (node:crypto:133:10) 3.691 at module.exports (/app/code/client/node_modules/webpack/lib/util/createHash.js:135:53) 3.691 at NormalModule._initBuildHash (/app/code/client/node_modules/webpack/lib/NormalModule.js:417:16) 3.691 at /app/code/client/node_modules/webpack/lib/NormalModule.js:452:10 3.691 at /app/code/client/node_modules/webpack/lib/NormalModule.js:323:13 3.691 at /app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:367:11 3.691 at /app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:233:18 3.691 at context.callback (/app/code/client/node_modules/loader-runner/lib/LoaderRunner.js:111:13) 3.691 at /app/code/client/node_modules/babel-loader/lib/index.js:59:103 { 3.691 opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], 3.691 library: 'digital envelope routines', 3.691 reason: 'unsupported', 3.691 code: 'ERR_OSSL_EVP_UNSUPPORTED' 3.691 } 3.691 3.691 Node.js v18.12.1 3.736 ERROR: "build:client" exited with 1.
-
@jdaviescoates said in Dockerfile build error OpenSSL:
I really don't want to discourage you from working on packaging more useful apps for Cloudron
mostly scratching my own itches, so a bit selfish, but hopefully it helps others
but sometimes I have to check myself and wonder if it's only me that's itching, maybe others know a better way to do it
-
@nebulon said in Dockerfile build error OpenSSL:
Sounds like a nodejs version incompatibility. From a quick kagi search, can you try to export NODE_OPTIONS=--openssl-legacy-provider before running the npm steps?
Thank you !
Building the image got past that issue.
Ran into others, of course, so will look at them, but seems that one is killed -
All sorted.
I cannot believe my own stupidity sometimes
Don't put me in charge of an aircraft.
Repo now at https://git.cloudron.io/timconsidine/snippet-box-cloudron