How to install nvm in docker?

后端 未结 14 962
陌清茗
陌清茗 2020-12-04 05:53

I am in the process of building a new Docker image and I\'m looking to get NVM installed so I can manage nodejs.

Reading the docs on how to install NVM they mention

14条回答
  •  情书的邮戳
    2020-12-04 06:58

    Based upon the suggestion in @Kuhess answer, I replaced the source command with the following in my Dockerfile

    RUN cat ~/.nvm/nvm.sh >> installnode.sh
    RUN echo "nvm install 0.10.35" >> installnode.sh
    RUN sh installnode.sh
    

提交回复
热议问题