docker build ‘/bin/sh -c npm --verbose i‘ returned a non-zero code: 1

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Xenomai is a real-time development framework for Linux, which allows developers to create real-time applications on a standard Linux kernel. Docker, on the other hand, is a platform that allows for the packaging and distribution of applications in lightweight, isolated containers. If you are looking to use Xenomai within a Docker container, you can create a Docker image that includes the Xenomai libraries and dependencies. This image can then be used to run Xenomai applications in a containerized environment. To get started, you will need to set up a Dockerfile that defines the steps to build your Docker image. In this Dockerfile, you will specify the base image, install Xenomai and its dependencies, and copy your Xenomai application code into the container. Once the Dockerfile is ready, you can build the image using the 'docker build' command. Here is a sample Dockerfile that demonstrates how to set up Xenomai in a Docker container: ``` FROM ubuntu:latest # Install Xenomai and its dependencies RUN apt-get update && apt-get install -y xenomai # Copy your Xenomai application code into the container COPY app /app # Set the working directory WORKDIR /app # Define the command to run your Xenomai application CMD ["./app"] ``` Once you have built the Docker image using the Dockerfile, you can run your Xenomai application in a container using the 'docker run' command. Please note that configuring and using Xenomai in a Docker container may require additional setup and configuration depending on your specific use case.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值