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.

Bewertung

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

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.

Beschreibung

docs

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/

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nodejs/docker-node

Alle Issues in nodejs/docker-node

Ähnliche Issues

Weitere Issues zu DevOps

Neue Issues direkt in Ihr Postfach

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