Dockerfile CMD命令没有执行npm start

Dockerfile

FROM hub.c.163.com/public/nodejs:6.11.0

WORKDIR /app

COPY . /app

RUN npm install

EXPOSE 3000

# CMD ["npm", "start"]
ENTRYPOINT ["npm", "start"]

docker ps:

CONTAINER ID    IMAGE  COMMAND                  
59988bd90894    myfd   "/bin/sh -c '/usr/..."   

在Dockerfile中配置了CMD ["npm", "start"],docker ps后显示COMMAND为"/bin/sh -c '/usr/..." 改为ENTRYPOINT ["npm", "start"]就可以了