Skip to content
Advertisement

Can docker run inside a Linux Container?

Koding is a collaborative programming environment, which creates a virtual machine for multiple user to colaborate on software development. They use Linux Containers to virtualize the machines. I’m not being able to install docker on it:

tiagoboldt@vm-2:~$ sudo docker build -t mongo .       
[sudo] password for tiagoboldt:          
Uploading context 645.1 kB
Uploading context 
Step 0 : FROM ubuntu:latest                                                                                                                                                                                      
Pulling repository ubuntu                                                                                                                                                                                        
9cd978db300e: Error pulling image (latest) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Driver aufs failed to get image rootfs 6170bb7b0ad1003a827e4dc5253ba49f6719599eac485db51eaafd507c13c311: 
9cd978db300e: Error pulling image (latest) from ubuntu, Driver aufs failed to get image rootfs 6170bb7b0ad1003a827e4dc5253ba49f6719599eac485db51eaafd507c13c311: permission denied                               
6170bb7b0ad1: Error downloading dependent layers                                                                                                                                                                 

2014/02/28 03:32:55 build: pull: Could not find repository on any of the indexed registries.

Can anyone suggest a workaround for installing docker?

Advertisement

Answer

Yes, it is possible. However, you can’t have an aufs partition nested within aufs. You need to mount an other system or use a different storage backend.

You can take a look at the docker’s makefile and hack/dind. You need the privileged mode in order to do so.

The easiest way to try is to do make shell and once in the container, you can start a new docker daemon 🙂

EDIT: I tried Koding and it indeed not possible. You are not privileged within their container so you can’t start a new docker.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement