nicbet / docker-phoenix

A dockerized Phoenix development and runtime environment.
GNU General Public License v3.0
277 stars 57 forks source link

bcrypt not working #37

Closed TheBlckbird closed 9 months ago

TheBlckbird commented 10 months ago

I tried to scaffold the auth system, but bcrypt doesn’t work:

I am on macOS 14.0 and am using the latest version of Phoenix Framework.

TheBlckbird commented 10 months ago

The same happens with argon2

TheBlckbird commented 10 months ago

You have to run this command before executing mix ecto.migrate: apk add build-base

TheBlckbird commented 10 months ago

But Bcrypt is still unavailable

TheBlckbird commented 10 months ago

I get the error Module Bcrypt not found

nicbet commented 9 months ago

@TheBlckbird sorry for the long wait. Work and family took a precedence over open-source the past weeks.

The Docker image does not include the build-base package that provides the make and cc commands to compile the bcrypt_elixir module.

You can run apk add build-base and then retry mix deps.compile to resolve the issue (just tested working in a brand new container / app).

I'll think for bit on whether we should include build-base in the image by default or not.

TheBlckbird commented 9 months ago

Thanks, I’ll try that out. I think we should include build-base by default, because a lot of applications have some kind of encryption and authentication.

nicbet commented 9 months ago

Agreed, since the primary concern of the repo is to provide an easy out of the box dev experience, not a production runtime container, and many dependencies need to be compiled, we should have build-base baked in.

I’ll add it to the next release.

nicbet commented 9 months ago

build-base package is now included by default starting from 1.7.5 release.

TheBlckbird commented 9 months ago

Thank you!