0

The base OpenShift NodeJS Docker image doesn't have iproute package installed so, my goal is to change the base image to achieve that. What I do is:

$ git clone --recursive https://github.com/sclorg/s2i-nodejs-container.git
$ cd s2i-nodejs-container
$ git submodule update --init

I change the 6/Dockerfile to include the missing package:

INSTALL_PKGS="rh-nodejs6 rh-nodejs6-npm rh-nodejs6-nodejs-nodemon nss_wrapper iproute" && \

I build the image:

$ cd 6
$ docker build -t myimage .

And I get this when I start a shell session:

$ docker run -it myimage /bin/bash
': not a valid identifierble: line 2: unset: `ENV
is probably not installed.-nodejs6

ss is now available (iproute package) but node and npm aren't:

$ ss
Netid State      Recv-Q Send-Q         Local Address:Port                          Peer Address:Port
$ node -v
bash: node: command not found
$ npm -v
bash: npm: command not found

Am I missing any step? Help would be appreciated.

John
  • 1
  • I've repeated all the steps you wrote and it works for me – Stefano Oct 30 '17 at 12:21
  • 1
    Thanks a lot @Stefano for the info. With that in mind and since I'm working on windows I ended up editing all file with sublime text and change the line ending format View > Line Endings > UNIX (already saw this one somewhere) and now it works. – John Oct 30 '17 at 12:56

0 Answers0