Node 6.2.2 & node.bcrypt.js
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Dockerfile
- Star
- 8.6k
- Fork
- 2k
- Merge trung bình
- 10 giờ 19 phút
- Pull request đã merge (30 ngày)
- 16
Mô tả
When using bcrypt with this image you may run into a problem if you are mounting your local node_modules folder into your docker container. There may be times when you need to recompile C++ addons (which bcrypt has). So, to do this make sure that before your container starts executing code to run npm rebuild link.
I do this by building my container and then execing into it. I then manually run npm rebuild as I haven't found a better way to do this yet.
I hope this saves somebody else the hour I wasted trying to figure this out.
Edit
So an easier solution for docker compose is command: bash -c "npm rebuild && npm start" assuming npm start kicks off your server. This same method can be applied to a Dockerfile or the command line.
Edit2
Another, albeit uglier, solution is to mount the Host machines g++ compiler:
/usr/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp nào trong repository hoặc test nào được nêu tên. Hãy xem lại tài liệu và các entry point của Dockerfile hoặc Docker Compose cho image Node 6.2.2, sau đó xác minh workaround bcrypt đã được ghi lại bằng cách chạy npm rebuild trước npm start; được xem là hoàn tất khi hướng dẫn giải thích rõ trường hợp node_modules được mount.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- docker, docker-compose, nodejs
- Lĩnh vực
- devops, documentation
- Loại issue
- Tài liệu
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100