Skip to content

Prisma failing on changed OpenSSL path in Alpine 3.21 #2175

@sambhav-gore

Description

@sambhav-gore

I have a project that uses Prisma.
Until few months ago there was no issue with the image but today if I try to build the docker image with following, Prisma fails to build as it does not find openssl

FROM node:20-alpine AS base

RUN npm install -g pnpm

FROM base as dependencies

WORKDIR /app

COPY package.json .
COPY pnpm-lock.yaml .

RUN pnpm install

FROM base as build

WORKDIR /app

COPY . .
COPY --from=dependencies /app/node_modules ./node_modules
RUN pnpm run build

It used to work before so something is broken recently.

installing openssl manually in dockerfile works as a workaround.

Environment

  • Platform: Alpine
  • Docker Version:
  • Node.js Version: 20 / 18
  • Image Tag: node:20-alpine / node:18-alpine

Expected Behavior

It should have openssl installed and available.

Current Behavior

No openssl

Possible Solution

Steps to Reproduce

Additional Information

Available workaround:

Add the following in the dockerfile to install openssl in the docker image manually:

RUN apk update \
	&& apk add --no-cache openssl\
	&& rm -rf /var/lib/apt/lists/* \
	&& rm -rf /var/cache/apk/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions