注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

LXD/Docker in LXD

From Funtoo
< LXD
Revision as of 00:46, February 12, 2018 by Palica (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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!"