Can docker work inside linux container?

Koding is a collaborative programming environment that creates a virtual machine for multiple users for collaborative software development. They use Linux containers to virtualize machines. I can not 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?

+6
source share
5 answers

Yes it is possible. However, you cannot have an aufs section nested in aufs. You need to connect another system or use a different backend.

You can see the file docker file and hack/dind. For this you need privileged mode.

- make shell , docker:)

EDIT: Koding, . , .

+5

, Docker Linux.

docker lxc lxc lxc.

, LXC:

  1. , lxc.aa_profile = lxc-container-default-with-nesting ( , lxc.aa_profile = unconfined) config LXC, , apparmor. ( ) /etc/apparmor.d/lxc.

  2. lxc . , , Ubuntu, apt-get install lxc.

  3. , docker --exec-driver=lxc. , docker -d --exec-driver=lxc. Ubuntu, , /etc/default/docker , :

DOCKER_OPTS="--exec-driver"

: https://github.com/docker/docker/issues/6783

:

  • apparmor Kern .
  • docker -d... , .

. , LXC apparmor Koding, , , , LXC, , , ( ).

+17

- .

.

docker run -i -t --privileged -v /var/lib/docker ubuntu bash
apt-get update && apt-get install -y docker.io
service docker.io start
ln -s /usr/bin/docker.io /usr/local/bin/docker
docker run -i -t ubuntu bash

.

:

  • --privileged .
  • -v /var/lib/docker, , .
  • ln -s /usr/bin/docker.io /usr/local/bin/docker , docker docker.io
+6

. : http://blog.docker.io/tag/inception/

.

docker run -privileged -t -i jpetazzo/dind
+2
source

You can do this inside Terminal.com.

Just launch the terminal and run it: https://blog.terminal.com/docker-without-containers-pulldocker/ .

Note. I work for Terminal.com. We use a non-LXC, non-libcontainer implementation of container technology (for example, which has no AUFS restrictions). We are trying to make containers that work like full Linux machines, and I think we are there. Give it a try.

+2
source

Source: https://habr.com/ru/post/1529342/


All Articles