Skip to content

Commit

Permalink
fix: symlink libssl on latest Alpine
Browse files Browse the repository at this point in the history
symlink `libssl` in the runner image on Alpine 3.21, as a workaround for older Prisma clients looking for it in `/lib`.

This fixes an issue for me where the Prisma client errors after building and running the latest Docker image. The app runs, but won't connect to the database.

```bash
gutenberg-1  | prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
gutenberg-1  | Please manually install OpenSSL and try installing Prisma again.
```
  • Loading branch information
eatyourgreens committed Feb 11, 2025
1 parent 1d5c580 commit 9fde531
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ RUN yarn build

# Production image, copy all the files and run next
FROM node:${NODE_VERSION} AS runner
RUN ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3
WORKDIR /app
RUN apk add --no-cache git
ENV NODE_ENV production
Expand Down

0 comments on commit 9fde531

Please sign in to comment.