unshare causes breakage in docker

Justin Cattle j at ocado.com
Wed Apr 28 09:55:18 CEST 2021


Googling around, there are a few ways.

It looks like this could be the most consistent:

grep -E ":/docker/.+$" /proc/1/cgroup

..which is looking for cgroups under a docker cgroup

It may be refined to:

grep -E ":/docker/[0-9a-f]+$" /proc/1/cgroup

..but I can't say that for sure.

What do you think, does that sound reasonable ?


Cheers,
Just


On Wed, 28 Apr 2021 at 07:58, Thomas Lange <lange at cs.uni-koeln.de> wrote:

> >>>>> On Tue, 27 Apr 2021 21:05:37 +0100, Justin Cattle <j at ocado.com>
> said:
>
>
>     > Can we somehow make unshare vs chroot an option ?  Or, even better
> perhaps, detect docker
>     > and don't use unshare in that case ?
>
> Do you know how to detect that the process is running inside docker?
>
> --
> viele Grüße Thomas
>

-- 


Notice: 
This email is confidential and may contain copyright material of 
members of the Ocado Group. Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the members of the 
Ocado Group.

If you are not the intended recipient, please notify us 
immediately and delete all copies of this message. Please note that it is 
your responsibility to scan this message for viruses.

References to the 
"Ocado Group" are to Ocado Group plc (registered in England and Wales with 
number 7098618) and its subsidiary undertakings (as that expression is 
defined in the Companies Act 2006) from time to time. The registered office 
of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way, 
Hatfield, Hertfordshire, AL10 9UL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20210428/89b84f74/attachment.html>


More information about the linux-fai mailing list