openshift origin simple-app报错解决

Container Setup for the Sample Application

OpenShift Origin is available as a Docker container. It has all of the software prebuilt and pre-installed, but you do need to do a few things to get it going.

 

https://github.com/openshift/origin/blob/master/examples/sample-app/container-setup.md

 

当我按照官网的run时候(以下命令)

docker run -d --name "openshift-origin" \

--net=host --privileged \

-v /var/run/docker.sock:/var/run/docker.sock \

-v /var/lib/openshift:/var/lib/openshift \

openshift/origin start

排错:

docker ps –a 显示我的container过几min就exit了.

然后我看下下这个container的日志

docker logs -f 22de0107d7e1

I0419 12:20:47.705301 3652 start_node.go:352] Connecting to API server https://192.168.14.138:8443

F0419 12:20:47.705333 3652 node.go:77] error: Running in containerized mode, but cannot find the /rootfs directory - be sure to mount the host filesystem at /rootfs (read-only) in the container.

 

解决:

参考: https://github.com/openshift/origin/issues/5366

docker run -d --name "openshift-origin" \

--privileged --net=host \

-v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys:ro -v /var/lib/docker:/var/lib/docker:rw \

-v /var/lib/openshift/openshift.local.volumes:/var/lib/openshift/openshift.local.volumes \

openshift/origin start

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值