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

Application Crashing When Using bcrypt's compare function on node docker image #1047

Open
rubemarjrtech opened this issue Aug 20, 2024 · 0 comments

Comments

@rubemarjrtech
Copy link

Title:
Application Crash with bcrypt's compare function on node docker image

Description:
I ran into an issue where my application crashes when using the compare function from bcrypt on the node Docker image.
Here are the details:

Steps to Reproduce:
Use the node Docker image in a Node.js application.
Utilize bcrypt's compare function to compare hashed passwords.
Observe the application crash upon invoking the compare function.

Expected Behavior:
The application should successfully execute the compare function without crashing.

Actual Behavior:
The application crashes when calling the compare function without throwing any specific error.

Additional Details:

Dockerfile:

FROM node

WORKDIR /home/app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 4000

CMD ["npm", "run", `"dev"]

and this is my docker-compose.yml:

version: '3'

networks:
   local:

services:
   mysql:
      container_name: mysqldb
      image: mysql:8
      environment:
         MYSQL_DATABASE:
         MYSQL_USER:
         MYSQL_PASSWORD:
         MYSQL_ROOT_PASSWORD:
      networks:
         - local
      ports:
         - '3306:3306'

   app:
      depends_on:
         - mysql
      container_name: blog-api
      build:
         context: .
         dockerfile: Dockerfile
      environment:
         DB_HOST:
         DB_USERNAME:
         DB_PASSWORD:
         DB_DATABASE:
      volumes:
         - ./:/home/app
      ports:
         - '4000:4000'
      networks:
         - local

I read on this issue it could be a library mismatch, but I tried using a .dockerignore file and nothing changed.

Any suggestion on what I could do?

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

No branches or pull requests

1 participant