0

I'm building a Dockerfile for an io.js project I've been working on, and I'd love to be able to do something similar to the following, but with io.js.

## Install Nodejs
RUN wget http://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
RUN tar -xvzf node-v0.12.7.tar.gz
RUN cd /node-v0.12.7/ && ./configure && make && make install clean

It seems to me that there should be an equivalent way to do this with io.js distributions.

## Install io.js.
RUN wget https://iojs.org/dist/v2.5.0/iojs-v2.5.0-darwin-x64.tar.gz
RUN tar -xvzf iojs-v2.5.0-darwin-x64.tar.gz
# Now run some command that actually installs io.js on the system.

The problem seems to be that the io.js "source" that I download from this distribution appears to just contain executables build for different systems, which isn't what I want.

Is there a way I can get the source files for iojs-v2.5.0 so I can go in there and do ./configure --prefix=/usr && make && make check && make install? It seems it would be way easier if I could do it this way on Docker.

David K.
  • 679
  • 2
  • 10
  • 23
  • 1
    as a sidenote, for nodejs, instead of your wget and tar, you could just do `ADD http://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz` which will do the same. Check the doc for ADD https://docs.docker.com/reference/builder/#add – user2915097 Aug 28 '15 at 19:18
  • Why is it easier to compile from source than used a binary made for your system? – Michael Aug 28 '15 at 20:41
  • @Michael On deeper examination it quickly became clear that it isn't, I'm just curious at this point. – David K. Aug 28 '15 at 23:35
  • 1
    I will admit for complete immutability you want to compile, but if this is not a shared image, immutability is not necessarily the most convenient practice. – Michael Sep 14 '15 at 18:47
  • 100%. That's exactly the way to go for that, but the tradeoff there seemed unfavorable in my case the more I evaluated it. – David K. Sep 14 '15 at 19:19

1 Answers1

0

The url for the source is without arch.

https://iojs.org/dist/v2.5.0/iojs-v2.5.0.tar.gz

You will need install dependencies to build like make and g++