Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Error loading shared library libssl.so.1.1' error #1708

Closed
wants to merge 1 commit into from
Closed

Fix 'Error loading shared library libssl.so.1.1' error #1708

wants to merge 1 commit into from

Conversation

elvisvoer
Copy link

Fixes the error as per indicated solution found here: prisma/prisma#16553 (comment)

@vercel
Copy link

vercel bot commented Dec 17, 2022

@elvisvoer is attempting to deploy a commit to the umami-software Team on Vercel.

A member of the Team first needs to authorize it.

@sparky005 sparky005 mentioned this pull request Dec 20, 2022
peterkos added a commit to peterkos/umami-blog that referenced this pull request Dec 31, 2022
@mikecao mikecao changed the base branch from master to dev January 1, 2023 04:36
@mikecao mikecao changed the base branch from dev to master January 1, 2023 04:36
@svargas-dev
Copy link

svargas-dev commented Jan 4, 2023

As a side note, I also fixed this in my fork on Railway by updating prisma dependencies ("@prisma/client" & "prisma") to ^4.8 instead of 4.50 and by changing line 4 of the Dockerfile to:

RUN apk add --no-cache libc6-compat openssl openssl-dev

I'm not sure OpenSSL-dev is required but I haven't had time to look deeper into this. I think this would be a preferred solution as it uses OpenSSL v3.x instead of the deprecated v1.x and it works with current versions of Alpine Linux.

EDIT: looks like the change to the Dockerfile isn't required: prisma/prisma#16553 (comment)

@svargas-dev
Copy link

I've opened another PR that addresses this issue with Prisma 4.8x #1728

@elvisvoer elvisvoer closed this Jan 4, 2023
@ebauger
Copy link

ebauger commented Jan 19, 2023

I did resolve by removing the lock file and update the prisma and @prisma/client dep and in the Dockerfile

Dockerfile working on Railway with release v1.39.5

# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat openssl openssl-dev
WORKDIR /app
COPY package.json ./
RUN yarn install

# Rebuild the source code only when needed
FROM node:16-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ARG DATABASE_TYPE
ARG BASE_PATH

ENV DATABASE_TYPE $DATABASE_TYPE
ENV BASE_PATH $BASE_PATH

ENV NEXT_TELEMETRY_DISABLED 1

RUN yarn build-docker

# Production image, copy all the files and run next
FROM node:16-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

RUN yarn add npm-run-all dotenv prisma@^4.8

# You only need to copy next.config.js if you are NOT using the default configuration
COPY --from=builder /app/next.config.js .
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/scripts ./scripts

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT 3000

CMD ["yarn", "start-docker"]

@gregonarash
Copy link

I did resolve by removing the lock file and update the prisma and @prisma/client dep and in the Dockerfile

Dockerfile working on Railway with release v1.39.5

# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat openssl openssl-dev
WORKDIR /app
COPY package.json ./
RUN yarn install

# Rebuild the source code only when needed
FROM node:16-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ARG DATABASE_TYPE
ARG BASE_PATH

ENV DATABASE_TYPE $DATABASE_TYPE
ENV BASE_PATH $BASE_PATH

ENV NEXT_TELEMETRY_DISABLED 1

RUN yarn build-docker

# Production image, copy all the files and run next
FROM node:16-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

RUN yarn add npm-run-all dotenv prisma@^4.8

# You only need to copy next.config.js if you are NOT using the default configuration
COPY --from=builder /app/next.config.js .
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/scripts ./scripts

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT 3000

CMD ["yarn", "start-docker"]

for me the your Docker and updating prisima in package.json to 4.8.0 did the job.

This should be updated in main repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants