The reason this error occurs is because the node module bcrypt is first compiled on your original machine (specific for your OS) and when an image is built on docker it cannot run since the OS is no longer the same.
I’m writing this because the process seemed very confusing before I learned how to do it!
Take into account this assumes that your app’s server code points to using PORT 3000 on default. If not, update that part of the code.
Docker is a great tool that allows you to take a snapshot of an application as an image and run it in different environments without worrying about system requirements, app dependencies, etc.