阅读背景:

无法让docker在Cloud9 IDE上运行

来源:互联网 

I'd like to get Docker running on Cloud9 IDE but am running into problems with permissions. Is there any way to resolve this?

我想让Docker在Cloud9 IDE上运行,但是我遇到了权限问题。有办法解决这个问题吗?

$ sudo apt-get install docker
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  docker
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 12.2 kB of archives.
After this operation, 65.5 kB of additional disk space will be used.
Get:1 https://archive.ubuntu.com/ubuntu/ trusty-updates/universe docker amd64 1.5-1 [12.2 kB]
Fetched 12.2 kB in 0s (30.5 kB/s)   
Selecting previously unselected package docker.
(Reading database ... 123844 files and directories currently installed.)
Preparing to unpack .../docker_1.5-1_amd64.deb ...
Unpacking docker (1.5-1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up cgroup-lite (1.9) ...
invoke-rc.d: unknown initscript, /etc/init.d/cgroup-lite not found.
dpkg: error processing package cgroup-lite (--configure):
 subprocess installed post-installation script returned error exit status 100
Setting up docker (1.5-1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Errors were encountered while processing:
 cgroup-lite
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo docker login
Username: <>
Password: <>
Email: <>
2015/01/01 05:11:28 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

$ sudo docker -d
2015/01/01 05:12:06 docker daemon: 1.0.1 990021a; execdriver: native; graphdriver: 
[0c39ae0d] +job serveapi(unix:///var/run/docker.sock)
[0c39ae0d] +job initserver()
[0c39ae0d.initserver()] Creating server
2015/01/01 05:12:06 Listening for HTTP on unix (/var/run/docker.sock)
[0c39ae0d] +job init_networkdriver()
[0c39ae0d.init_networkdriver()] creating new bridge for docker0
operation not permitted
[0c39ae0d] -job init_networkdriver() = ERR (1)
operation not permitted
[0c39ae0d] -job initserver() = ERR (1)
2015/01/01 05:12:06 operation not permitted

$ sudo service docker start
docker: unrecognized service

Lorem ipsum stackoverflow you are annoying forcing me to write more when it isn't necessary to do so.

Lorem ipsum stackoverflow你太烦人了,没必要让我多写点东西。

3 个解决方案

#1


3  

I am suspicious about the line apt-get install docker as this is some other docker. You might want to try docker.io or lxc-docker as per https://docs.docker.com/installation/ubuntulinux/

我怀疑这行apt-get安装docker,因为这是另一个docker。你可能想试试docker。io或lxc-docker,如https://docs.docker.com/installation/ubuntulinux/所示

#2


11  

Installing Docker inside a Cloud9 workspace will not work because C9 workspaces run on Docker. Running Docker inside Docker would require special permissions and is, therefore, advised against by those who know best for security reasons.

在Cloud9工作区中安装Docker将不起作用,因为C9工作区在Docker上运行。在Docker内部运行Docker将需要特殊的权限,因此,出于安全原因,最了解Docker的人建议不要这样做。

That being said, you can use Docker from an SSH workspace, which allows you to connect Cloud9 to your own server. Since that workspace isn't running in Docker (on Cloud9's servers) you can do whatever you want with it (including run Docker).

也就是说,您可以使用来自SSH工作区的Docker,它允许您将Cloud9连接到自己的服务器。由于该工作区不在Docker(在Cloud9的服务器上)运行,所以您可以使用它(包括运行Docker)来做任何事情。

#3


1  

Cloud9 workspaces run within Docker containers. They can't have docker containers inside their own docker containers because they would need to be privileged, which is a security risk.

Cloud9工作区在Docker容器内运行。它们不能在自己的docker容器中包含docker容器,因为它们需要特权,这是一种安全风险。

More Details here : https://community.c9.io/t/workspace-from-dockerfile-snapshots/34

这里有更多的细节:https://community.c9.io/t/workspacefrom-dockerfile -snapshots/34


分享到: