Closed miles2smiles closed 6 years ago
HI @miles2smiles,
Checking your issue here, but not yet successful in reproducing it:
➜ nodejs-distribution git:(flexible-builds-golang) ✗ docker run registry.connect.redhat.com/nearform/nearform-s2i-nodejs8@sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66 npm
....
npm@5.6.0 /usr/local/lib/node_modules/npm
Can you pull this image locally and try it? what version of Openshift are you using? What docker version are you using?
HI Elexy,
Thank you for the reply, below is the required information.
docker version Client: Version: 1.13.1 API version: 1.26 Package version: docker-1.13.1-63.git94f4240.el7.centos.x86_64 Go version: go1.9.4 Git commit: 94f4240/1.13.1 Built: Fri May 18 15:44:33 2018 OS/Arch: linux/amd64
Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: docker-1.13.1-63.git94f4240.el7.centos.x86_64 Go version: go1.9.4 Git commit: 94f4240/1.13.1 Built: Fri May 18 15:44:33 2018 OS/Arch: linux/amd64 Experimental: false
oc version oc v3.9.0+ba7faec-1 kubernetes v1.9.1+a0ce1bc657 features: Basic-Auth GSSAPI Kerberos SPNEGO
docker run registry.connect.redhat.com/nearform/nearform-s2i-nodejs8@sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66 npm Unable to find image 'registry.connect.redhat.com/nearform/nearform-s2i-nodejs8@sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66' locally Trying to pull repository registry.connect.redhat.com/nearform/nearform-s2i-nodejs8 ... sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66: Pulling from registry.connect.redhat.com/nearform/nearform-s2i-nodejs8 d02c3bd49e78: Pull complete 475b0168c252: Pull complete 1b8940d45399: Pull complete b7a0fc99468d: Pull complete 7e518720bea5: Pull complete Digest: sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66 Status: Downloaded newer image for registry.connect.redhat.com/nearform/nearform-s2i-nodejs8@sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66 npm info it worked if it ends with ok npm info using npm@5.6.0 npm info using node@v8.11.3
Usage: npm
where
npm
Specify configs in the ini-formatted file:
/opt/app-root/src/.npmrc
or on the command line via: npm
npm@5.6.0 /usr/local/lib/node_modules/npm
Hi @miles2smiles, I have been looking at your issue and couldn't able to reproduce it either. Then I noticed that you were testing a different docker image, look:
[root@devnet-cdi-server ~]# docker run --name=rhelnode -it registry.access.redhat.com/rhel7/rhel /bin/bash
[root@68354871e98a /]# uname -a
Linux 68354871e98a 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@68354871e98a /]# npm
bash: npm: command not found
[root@68354871e98a /]# node
bash: node: command not found
You were testing registry.access.redhat.com/rhel7/rhel
image and not registry.connect.redhat.com/nearform/nearform-s2i-nodejs8
.
That's why it told you there is no npm
and node
.
Hi,
I tried the latest version today
docker pull registry.connect.redhat.com/nearform/nearform-s2i-nodejs8
and I can see node and npm.
=> docker run -it registry.connect.redhat.com/nearform/nearform-s2i-nodejs8 bash bash-4.2$ node -v v8.11.3 bash-4.2$ npm -v 5.6.0 bash-4.2$
ticket can be closed.
Hi All,
I've recently downloaded this docker image for openshift and I am getting the following. error while building.
oc import-image my-nearform/nearform-s2i-nodejs8 --from=registry.connect.redhat.com/nearform/nearform-s2i-nodejs8 --confirm
The import completed successfully.
Name: nearform-s2i-nodejs8 Namespace: oaop Created: 30 minutes ago Labels:
Annotations: openshift.io/image.dockerRepositoryCheck=2018-07-11T09:37:09Z
Docker Pull Spec: docker-registry.default.svc:5000/oaop/nearform-s2i-nodejs8
Image Lookup: local=false
Unique Images: 1
Tags: 1
latest tagged from registry.connect.redhat.com/nearform/nearform-s2i-nodejs8
Image Name: nearform-s2i-nodejs8:latest Docker Image: registry.connect.redhat.com/nearform/nearform-s2i-nodejs8@sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66 Name: sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66 Created: Less than a second ago Annotations: image.openshift.io/dockerLayersOrder=ascending Image Size: 185.6MB (first layer 74.93MB, last binary layer 19.32MB) Image Created: 9 days ago Author:
Arch: amd64
Entrypoint: container-entrypoint
Command: /bin/sh -c ${STI_SCRIPTS_PATH}/usage
Working Dir: /opt/app-root/src
User: 1001
Exposes Ports: 8080/tcp
Docker Labels: architecture=x86_64
authoritative-source-url=registry.access.redhat.com
build-date=2018-06-25T07:14:31.245781
com.redhat.build-host=osbs-cpt-008.ocp.osbs.upshift.eng.rdu2.redhat.com
com.redhat.component=s2i-base-container
com.redhat.deployments-dir=/opt/app-root/src
description=Rhel7 based s2i image for NodeJS applications
distribution-scope=public
io.k8s.description=Platform for building and running Node.js applications
io.k8s.display-name=Node.js 8.11.3
io.openshift.expose-services=8080:http
io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
io.openshift.tags=builder,nodejs,nodejs-8.11.3
io.s2i.scripts-url=image:///usr/libexec/s2i
maintainer=nearForm Developer Support devsupport@nearform.com
name=rhel7-s2i-nodejs
nf.from={ "from": { "image": "registry.access.redhat.com/rhscl/s2i-base-rhel7", "tag": "1-26", "last_updated": "20180627T13:23:52.000-0400", "sha":"sha256:a8c51a1d9d756950ae9b90469b1847a9a1bbdeedf67e974fd0f32230d46a9e18" } }
nf.node.version=8.11.3
release=26
summary=Rhel7 based s2i image for NodeJS applications
url=https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/s2i-base-rhel7/images/1-26
usage=This image is very generic and does not serve a single use case. Use it as a base to build your own images.
vcs-ref=eeec5a82890bac311adad73b4a8cd55ee77d063e
vcs-type=git
vendor=nearForm Ltd
version=1
Environment: PATH=/opt/app-root/src/node_modules/.bin/:/opt/app-root/src/.npm-global/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
container=oci
SUMMARY=Base image with essential libraries and tools used as a base for builder images like perl, python, ruby, etc.
DESCRIPTION=The s2i-base image, being built upon s2i-core, provides any images layered on top of it with all the tools needed to use source-to-image functionality. Additionally, s2i-base also contains various libraries needed for it to serve as a base for other builder images, like s2i-python or s2i-ruby.
STI_SCRIPTS_URL=image:///usr/libexec/s2i
STI_SCRIPTS_PATH=/usr/libexec/s2i
APP_ROOT=/opt/app-root
HOME=/opt/app-root/src
BASH_ENV=/opt/app-root/etc/scl_enable
ENV=/opt/app-root/etc/scl_enable
PROMPT_COMMAND=. /opt/app-root/etc/scl_enable
NODEJS_SCL=rh-nodejs8
NPM_RUN=start
NODE_VERSION=8.11.3
NPM_VERSION=5.6.0
V8_VERSION=6.2.414.54
NODE_LTS=false
NPM_CONFIG_LOGLEVEL=info
NPM_CONFIG_PREFIX=/opt/app-root/src/.npm-global
DEBUG_PORT=5858
NODE_ENV=production
DEV_MODE=false
PREBUILT=N
Pulling image "registry.connect.redhat.com/nearform/nearform-s2i-nodejs8@sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66" ...
| ---> Installing application source | ---> Building your Node application from source | ---> Using 'npm install' | error: build error: non-zero (13) exit code from registry.connect.redhat.com/nearform/nearform-s2i-nodejs8@sha256:373584e6943670af0b3ecaddd0cabda3abbf675e562c4a20e4bafe780e9e4f66
When I check the node ( docker run ) node and npm commands are not available and rpm.
[root@devnet-cdi-server ~]# docker run --name=rhelnode -it registry.access.redhat.com/rhel7/rhel /bin/bash [root@68354871e98a /]# uname -a Linux 68354871e98a 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux [root@68354871e98a /]# npm bash: npm: command not found [root@68354871e98a /]# node bash: node: command not found
Please help.
I want to use nodejs on RHEL 7 for openshift.
Thanks.