在OpenShift 3上部署自定义的NodeJS Docker镜像
基地的OpenShift NodeJS Docker镜像没有安装iproute软件包,所以我的目标是改变基础镜像来实现。 我所做的是:
$ git clone --recursive https://github.com/sclorg/s2i-nodejs-container.git $ cd s2i-nodejs-container $ git submodule update --init
我更改了6 / Dockerfile以包含缺less的包:
INSTALL_PKGS="rh-nodejs6 rh-nodejs6-npm rh-nodejs6-nodejs-nodemon nss_wrapper iproute" && \
我build立的形象:
$ cd 6 $ docker build -t myimage .
我在开始一个shell会话时得到这个:
$ docker run -it myimage /bin/bash ': not a valid identifierble: line 2: unset: `ENV is probably not installed.-nodejs6
ss现在可用(iproute包)但节点和npm不是:
$ 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
我错过了任何一步? 帮助将不胜感激。