pkutxq
pkutxq

Reputation: 43

Could i run docker in a docker Container Ubuntu 14.04

The container is Ubuntu 14.04 64bits. I installed docker in it reference https://docs.docker.com/v1.1/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit. When I run service docker start, it responded mount: permission denied.Docker version 1.5.0, build a8a31ef. Thanks.

Upvotes: 1

Views: 207

Answers (2)

Montells
Montells

Reputation: 6679

docker run -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker ubuntu:14.04 docker images

This line shows you run docker command inside container. You must to share via -v the docker deamon and the socket file.

Other way if you need run this docker comands with other user than root is create other image inheriting FROM ubuntu and adding required user to docker group of the host.

look at this

Upvotes: 0

jwodder
jwodder

Reputation: 57470

Based on the instructions for the de facto standard Docker-in-Docker image, you need to run your original Docker container with the --privileged flag so that it can run Docker inside itself.

Upvotes: 1

Related Questions