nodejs / nodejs/docker-node

Node 6.2.2 & node.bcrypt.js

Offen
#206 4 Kommentare 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

docs
Vorherrschende Sprache
Dockerfile
Sterne
8.6k
Forks
2k
Ø Merge
10 Std. 19 Min.
Gemergte PRs (30 T.)
16

Beschreibung

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/

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es wird keine Repository-Datei und kein Test genannt. Überprüfe die Dokumentation und die Dockerfile- oder Docker Compose-Einstiegspunkte für das Node 6.2.2-Image und verifiziere anschließend den dokumentierten bcrypt-Workaround, indem du npm rebuild vor npm start ausführst; abgeschlossen ist dies, wenn die Anleitung den Fall mit gemountetem node_modules klar erklärt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, docker-compose, nodejs
Bereich
devops, documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.