Difference between revisions of "LXD/Docker in LXD"

From Funtoo
< LXD
Jump to navigation Jump to search
(Created page with "If you have followed our notes about LXD in LXD then there is not much you need to do to be able to run Docker inside your container. {{note|The container...")
(No difference)

Revision as of 00:46, February 12, 2018

If you have followed our notes about LXD in LXD then there is not much you need to do to be able to run Docker inside your container.

   Note

The container has to be setup similarly as for LXD in LXD (security.nesting needs to be enabled) so let us know if you want this turned on for your container at bugs.funtoo.org

Let's start a simple Hello world docker container inside our LXD container.

Install and start docker

As simple as:

root # emerge -v app-emulation/docker
root # /etc/init.d/docker start

Starting your first docker microcontainer

root # docker run --detach --name app carinamarina/hello-world-app
root # docker run --detach --name web --link app:helloapp -p 80:5000 carinamarina/hello-world-web

Go to your containers ip address and if you were not running anything on port 80 you should get:

The linked container said... "Hello World!"