docker build 报错:’/bin/sh -c npm --verbose i’ returned a non-zero code: 1
# RUN npm --verbose i
修改成
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
RUN cnpm install
其他命令:
- 使用Dockerfile创建镜像egg:egg
docker build -t egg:egg .
- 通过镜像运行一个容器
docker run -d -p 8000:8000 egg:egg