[lxc-users] Find out if one is inside a container

Bostjan Skufca bostjan at a2o.si
Wed Jul 15 12:45:08 UTC 2015


On 15 July 2015 at 08:29, Christoph Mathys <eraserix at gmail.com> wrote:

> On Wed, Jul 15, 2015 at 4:08 AM, Bostjan Skufca <bostjan at a2o.si> wrote:
> >
> >
> > Does anyone know where that container variable gets its value from?
> >
>
> src/lxc/start.c in do_start() contains:
>
> if (putenv("container=lxc")) {
>

Ah, I was not thinking outside of the box (Ubuntu OS in container). Tnx!

b.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150715/5400cf6d/attachment.html>


More information about the lxc-users mailing list