8
arantr
8y

Have spent now about 8h trying to install nodejs, npm and less inside a Docker machine :/

Comments
  • 0
    12h and counting... :/ FML
  • 1
    I have tried to do this... i... kinda... gave up.
  • 0
    What's the issue?
  • 0
    @azous multiple versions of node and npm causing problems...
  • 0
    @olpe wanna share your Dockerfile so I can try here too?
  • 1
    @azous nope, sorry. A client project...
  • 0
    @olpe 👍 what's the image you are using? Gonna try to help installing at least node and npm here
  • 2
    have you tried out nvm, it's a wonderful version manager for npm and node, i highly recommend it
  • 0
    We are using mhart/alpine-node as baseimage:

    https://github.com/mhart/...

    When developing, mount your code dir to a folder you are starting your app. In prod you ofcourse ADD your code to the final image.

    Dont use root (the default in docker) but add normal user and group in your Dockerfile which your app will run.

    And run the npm install inside the docker, not with locally installed npm.
Add Comment