Building CT3 app with docker - libssl error

When building ct3 app I get an error saying that in prisma generate it can't load libssl package. I've done it before like a milion times in 2022 and it worked. I haven't changed anything in dockerFile since and it is just copied from the docs. Error:
#13 87.17 > [email protected] postinstall /app
#13 87.17 > prisma generate
#13 87.17
#13 97.90 Prisma schema loaded from schema.prisma
#13 100.7 Error: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
#13 100.7 Details: Unable to require(`/app/node_modules/.pnpm/[email protected]/node_modules/prisma/libquery_engine-linux-musl.so.node`)
#13 100.7 Error loading shared library libssl.so.1.1: No such file or directory (needed by /app/node_modules/.pnpm/[email protected]/node_modules/prisma/libquery_engine-linux-musl.so.node)
#13 100.7 [Context: getDmmf]
#13 100.7
#13 100.7 Prisma CLI Version : 4.7.1
#13 100.8  ELIFECYCLE  Command failed with exit code 1.
------
executor failed running [/bin/sh -c if [ -f yarn.lock ]; then yarn --frozen-lockfile; elif [ -f package-lock.json ]; then npm ci; elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; else echo "Lockfile not found." && exit 1; fi]: exit code: 1
#13 87.17 > [email protected] postinstall /app
#13 87.17 > prisma generate
#13 87.17
#13 97.90 Prisma schema loaded from schema.prisma
#13 100.7 Error: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
#13 100.7 Details: Unable to require(`/app/node_modules/.pnpm/[email protected]/node_modules/prisma/libquery_engine-linux-musl.so.node`)
#13 100.7 Error loading shared library libssl.so.1.1: No such file or directory (needed by /app/node_modules/.pnpm/[email protected]/node_modules/prisma/libquery_engine-linux-musl.so.node)
#13 100.7 [Context: getDmmf]
#13 100.7
#13 100.7 Prisma CLI Version : 4.7.1
#13 100.8  ELIFECYCLE  Command failed with exit code 1.
------
executor failed running [/bin/sh -c if [ -f yarn.lock ]; then yarn --frozen-lockfile; elif [ -f package-lock.json ]; then npm ci; elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; else echo "Lockfile not found." && exit 1; fi]: exit code: 1
16 Replies
Patryk Makowski
Patryk MakowskiOP2y ago
On localhost it builds and generates prisma model alright
cje
cje2y ago
there was an issue related to prisma/libssl in the new version of alpine we updated the docs recently should work again if you follow that also make sure you're on the newest prisma version
Patryk Makowski
Patryk MakowskiOP2y ago
Yeah, I see that and I updated dockerfile and I get
Patryk Makowski
Patryk MakowskiOP2y ago
I though that it was cache issue but with --no-cache flag i get the same error Do you know why that might be an issue?
Neto
Neto2y ago
the issue was on prisma itself changing their ssl dependency and breaking a lot of stuff not only on docker
Patryk Makowski
Patryk MakowskiOP2y ago
So what can I do about that? The error I get is connected with the openssl1.1-compat package that docker just can't find
Neto
Neto2y ago
install an older version of the openssl compatible with prisma
Patryk Makowski
Patryk MakowskiOP2y ago
GitHub
fix(doc): dockerFile builds fail as openssl1.1-compat doesn't exist...
Closes # ✅ Checklist I have followed every step in the contributing guide (updated 2022-10-06). The PR title follows the convention we established conventional-commit I performed a functional t...
Patryk Makowski
Patryk MakowskiOP2y ago
I changed the openssl package to the proper one and it works There is no openssl1.1-compat but there is openssl1.1-compat-dev 😉
cje
cje2y ago
seems like you're still on alpine 3.16?
cje
cje2y ago
GitHub
bug: docs - Docker node:16-alpine requires setting `engineType = "b...
Provide environment information System: OS: Linux 6.0 Fedora Linux 37 (Workstation Edition) CPU: (16) x64 AMD Ryzen 7 PRO 6850U with Radeon Graphics Memory: 23.97 GB / 30.12 GB Container: Yes Shell...
cje
cje2y ago
different alpine versions come with different openssl stuff its kind of a mess
Patryk Makowski
Patryk MakowskiOP2y ago
Yeah, it's like that in docs You're right for 3.17 it just works 🙂
cje
cje2y ago
oh then docs are wrong i think? 3.16 should use regular openssl if i understand the issue correctly i dont use ct3a in docker tbh so my knowledge is just github discussion
Patryk Makowski
Patryk MakowskiOP2y ago
Ok, then we need to update the version instead of package name Changed it in the PR And also I checked if it works Still building but the part that was messing things up is alright It works
Patryk Makowski
Patryk MakowskiOP2y ago
Want results from more Discord servers?
Add your server