openshift origin simple-app报错解决

来源:互联网 发布:全球社交软件排名 编辑:程序博客网 时间:2024/06/07 04:54

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
原创粉丝点击