Share images between host and child docker

I read this article http://blog.docker.io/2013/09/docker-can-now-run-within-docker/ , and I want to share the images between the host dock and the baby dock. But when I started

sudo docker run -v / var / lib / docker: / var / lib / docker -privileged -t -i jpetazzo / dind

I can not connect to the "child" docker from the dind container.

     root@5a0cbdc2b7df:/# docker version
     Client version: 0.8.1
     Go version (client): go1.2
     Git commit (client): a1598d1
     2014/03/13 18:37:49 Can't connect to docker daemon. Is 'docker -d' running on this host?

How can I share my local images between host and child docker

+4
source share
1 answer

! Docker , /var/lib/docker, ( Docker) , .

, , .

  • Docker , , Docker , :

    docker run -v /var/run/docker.sock:/var/run/docker.sock \
               -v /usr/bin/docker:/usr/bin/docker \
               -t -i ubuntu bash
    
  • Docker (, Docker / ), , , Docker-in-the-Host Docker-in-the-Container.

, !

+7

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


All Articles