Closed maxscott closed 9 years ago
@maxwerr to properly get Bycrypt, my experience is that it works best with npm 0.10.x
boot2docker is deprecated, and replaced with docker toolbox. I'd suggest giving that a try and see if it helps. I don't have a mac though, so I have no personal experience with it.
You can also use a custom Dockerfile for your sails container. for example:
FROM iojs:3.2.0
RUN mkdir -p /server \
&& npm install -g sails
VOLUME ["/server"]
WORKDIR /server
EXPOSE 1337
CMD ["sails", "lift"]
Then, in your docker-compose.yml
:
server:
build: ./server
volumes:
- ./server/:/server
ports:
- "1337:1337"
links:
- db
Then to install the node modules (from your sane root):
→ docker-compose run server npm install
Any modules that are native in any dependency you are using will be compiled within the container, including bcrypt.
re: @IanVS I see that now--the standard docker-sails image used in sane requires boot2docker though :( so maybe if I use the custom dockerfile as outlined by @kriswill !? Thanks for the tips :moneybag:
I'm currently running from boot2docker on my mac, and attempting to npm install on the image actually fails due to missing $PYTHON, which I can't seem to install, but isn't a part of the stock docker-sails image. Was wondering how you got around that, or if I'm just completely missing something.. Thanks!