2017-12-11 2 views
0

: docker build . -t imagename는, 그러나 나는 NPM 버전에 대한 경고가 계속 나는 업데이트 버전을 Node.js를 가지고 있고, 그러나업데이트 NPM은 제가 Node.js를 도커 이미지 건물입니다

npm WARN deprecated This version of npm lacks support for important features, 
npm WARN deprecated such as scoped packages, offered by the primary npm 
npm WARN deprecated registry. Consider upgrading to at least [email protected], if not the 
npm WARN deprecated latest stable version. To upgrade to [email protected], run: 
npm WARN deprecated 
npm WARN deprecated npm -g install [email protected] 
npm WARN deprecated 
npm WARN deprecated To upgrade to the latest stable version, run: 
npm WARN deprecated 
npm WARN deprecated npm -g install [email protected] 
npm WARN deprecated 
npm WARN deprecated (Depending on how Node.js was installed on your system, you 
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if 
npm WARN deprecated on Windows, run them from an Administrator prompt.) 
npm WARN deprecated 
npm WARN deprecated If you're running the version of npm bundled with 
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS 
npm WARN deprecated will be bundled with a version of [email protected], which has some small 
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and 
npm WARN deprecated semver behavior. 

여전히 않을 것 직장 :

node -v 
v8.9.3 
npm -v 
5.6.0 

나는 npm -g install [email protected]을 실행했지만 여전히 작동하지 않습니다. 가능성이 원인이 될 수 무엇

FROM alpine:3.1 

# Update 
RUN apk add --update nodejs 

# Install app dependencies 
COPY package.json /src/package.json 
RUN cd /src; npm -g install [email protected] 

# Bundle app source 
COPY . /src 

CMD ["node", "--harmony","/src/app.js"] 

Dockerfile

? 노드를 사용하여 응용 프로그램을 실행할 수 있습니다.

내가 Dockerfile에서 우분투 16.04.3 LTS

+0

Dockerfile 내용을 게시 할 수 있습니까 – robjwilkins

+0

Dockerfile로 업데이트 한 질문 – Khaled

+1

공식 노드 이미지를 사용하지 않는 이유가 있습니까? https://hub.docker.com/_/node/ –

답변

1

를 실행하는거야, 내가 대신 최신 고산 버전 FROM alpine:3.7을 사용하고 작동합니다.