Install node in Dockerfile?

前端 未结 4 1774
天涯浪人
天涯浪人 2021-02-04 00:15

I am user of AWS elastic beanstalk, and I have a little problem. I want to build my CSS files with less+node. But I don`t know how to install node in my dockerfile, when buildin

4条回答
  •  爱一瞬间的悲伤
    2021-02-04 00:17

    Running apt-get install node does not install Node.js, because that's not the package you're asking for.

    If you run apt-cache info node you can see that what you are installing is a "Amateur Packet Radio Node program (transitional package)"

    You should follow the Node.js install instructions to install via package manager.

    Or if you like building from git, you can just do that inside Docker:

    RUN apt-get install -y git-core curl build-essential openssl libssl-dev \
     && git clone https://github.com/nodejs/node.git \
     && cd node \
     && ./configure \
     && make \
     && sudo make install
    

提交回复
热议问题