Can't get docker running on Cloud9 IDE
Asked Answered
F

5

13

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

$ 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 http://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.

Forewing answered 1/1, 2015 at 5:16 Comment(0)
P
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 http://docs.docker.com/installation/ubuntulinux/

Paraffin answered 1/1, 2015 at 11:44 Comment(2)
OMG I can't believe I missed that. There's even a note about it on the page you referenced. Thanks!Forewing
This should not be accepted as the correct answer as this does not solve the issue. This answer may be true but it does not allow Docker to be installed on Cloud9.Ferren
F
13

Update: The answer below applies to c9.io, not AWS Cloud9. AWS Cloud9 allows you to run docker as you would normally on whatever backing you're using for the environment, whether EC2 or another VM provider.


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.

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).

Ferren answered 9/2, 2016 at 3:7 Comment(4)
That may very well be the case, but that doesn't particularly help for someone trying to learn how to use Docker within a Cloud 9 environment. I'm curious... while Docker-in-Docker for managing the real machine would certainly be a problem, is there a reason that there can't be a more limited Docker-in-Docker that emulates Docker but can only manage the virtually provided resources?Spates
That sounds like something that'd take substantial engineering effort. That being said, you can make an SSH workspace and run docker from there while still reaping the benefits of Cloud9.Ferren
I am confused. the OP accepted the answer, but you are saying that it is not possible?Moreland
@TimmyVonHeiss indeed this is not possible, not sure why the answer was accepted. Full disclaimer: I work for Cloud9 so I can confirm that my answer is correct (as of time of this message).Ferren
P
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 http://docs.docker.com/installation/ubuntulinux/

Paraffin answered 1/1, 2015 at 11:44 Comment(2)
OMG I can't believe I missed that. There's even a note about it on the page you referenced. Thanks!Forewing
This should not be accepted as the correct answer as this does not solve the issue. This answer may be true but it does not allow Docker to be installed on Cloud9.Ferren
D
3

Cloud9 IDE (c9.io) does not support Docker since the environment itself is using Docker. They don't want users getting too close to the root Docker level environment. Here's their info on Docker and other software they do not support: Cloud9 Software they do not support list. I was able to install Docker on c9.io but it was throwing errors when trying to use the Docker stable repo install method; which led me here.

Interestingly the AWS Hosted version of cloud 9 does allow for deeper usage of Docker. Unfortunately, this is a seperate cost and interface to users through AWS... perhaps I'll switch all together? Here's that info on AWS Cloud9 supporting Docker and a link to AWS landing page for cloud9.

Dogged answered 2/9, 2018 at 9:26 Comment(0)
R
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.

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

Ruella answered 7/3, 2016 at 16:7 Comment(0)
P
0

Cloud9 environments come with docker pre-installed. Check by: docker --version. And see this sample for more info: https://docs.aws.amazon.com/cloud9/latest/user-guide/sample-docker.html

Puffer answered 1/3, 2019 at 23:35 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.