Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove dockerinit #18355

Closed
jessfraz opened this issue Dec 2, 2015 · 29 comments
Closed

remove dockerinit #18355

jessfraz opened this issue Dec 2, 2015 · 29 comments

Comments

@jessfraz
Copy link
Contributor

jessfraz commented Dec 2, 2015

the only thing relying on it is https://github.com/docker/libnetwork/blob/9fb7ba8fa01f0ddce99713799e760223c842fb4b/drivers/bridge/setup_bridgenetfiltering.go#L159

cc @rhatdan I think you wanted this as well

cc @tianon

@jessfraz
Copy link
Contributor Author

jessfraz commented Dec 2, 2015

ping @mrjana @mavenugo

@jessfraz
Copy link
Contributor Author

jessfraz commented Dec 2, 2015

ping @LK4D4 just to make sure that was the only thing hanging for removal

@jessfraz
Copy link
Contributor Author

jessfraz commented Dec 2, 2015

gettting this for #17989 will help us not need libseccomp.a when compiling the binaries because dockerinit is static, it is trying to find it now

@rhatdan
Copy link
Contributor

rhatdan commented Dec 2, 2015

I am all for this, the only problem I have is a side effect. Currently one of my patches uses the location of dockerinit to figure out where alternate docker binaries are stored. /usr/libexec/docker on Red Hat based OS. /usr/lib/docker on others.

If we had a standard directory for helper executables to be installed...

@jessfraz
Copy link
Contributor Author

jessfraz commented Dec 2, 2015

woohooooo we want the same thing <3

On Wed, Dec 2, 2015 at 7:05 AM, Daniel J Walsh notifications@github.com
wrote:

I am all for this, the only problem I have is a side effect. Currently one
of my patches uses the location of dockerinit to figure out where alternate
docker binaries are stored. /usr/libexec/docker on Red Hat based OS.
/usr/lib/docker on others.

If we had a standard directory for helper executables to be installed...


Reply to this email directly or view it on GitHub
#18355 (comment).

@LK4D4
Copy link
Contributor

LK4D4 commented Dec 2, 2015

@jfrazelle Yeah, I don't see other places. I never build dockerinit and /.dockerinit in container is just empty file.

@zelahi
Copy link
Contributor

zelahi commented Dec 3, 2015

I would like to take on this issue, but please correct me if I am misinterpreting it

The following file needs to be removed:
https://github.com/docker/docker/blob/master/dockerinit/dockerinit.go

and the following file needs to be updated to not reference .dockerinit:
https://github.com/docker/libnetwork/blob/9fb7ba8fa01f0ddce99713799e760223c842fb4b/drivers/bridge/setup_bridgenetfiltering.go#L159

@jessfraz
Copy link
Contributor Author

jessfraz commented Dec 4, 2015

it touches a lot of places a lot of things will need to be changed in
engine, but awesome you are willing to take it on

On Thu, Dec 3, 2015 at 3:11 PM, Zuhayr Elahi notifications@github.com
wrote:

I would like to take on this issue, but please correct me if I am
misinterpreting it

The following file needs to be removed:
https://github.com/docker/docker/blob/master/dockerinit/dockerinit.go

and the following file needs to be updated to not reference .dockerinit:

https://github.com/docker/libnetwork/blob/9fb7ba8fa01f0ddce99713799e760223c842fb4b/drivers/bridge/setup_bridgenetfiltering.go#L159


Reply to this email directly or view it on GitHub
#18355 (comment).

@sambuddhabasu
Copy link
Contributor

Is anyone working on this issue currently? If no, I would like to work on it.

@thaJeztah
Copy link
Member

@zelahi are you working on this?

@zelahi
Copy link
Contributor

zelahi commented Dec 10, 2015

@sammyshj go ahead and take this one =)

@sambuddhabasu
Copy link
Contributor

The dockerinit file is mentioned in many files. Should all these references be handled and then the dockerinit file be removed?

@LK4D4
Copy link
Contributor

LK4D4 commented Dec 10, 2015

@sammyshj yeah, I think so

@sambuddhabasu
Copy link
Contributor

The dockerinit file is also referenced in the file https://github.com/docker/docker/blob/master/daemon/container_operations_unix.go#L234
By removing the dockerinit file, all of these files also has to be modified. Can I know what the InitPath has to be modified into?

@LK4D4
Copy link
Contributor

LK4D4 commented Dec 11, 2015

@sammyshj InitPath shouldn't be needed after removing.

@jessfraz
Copy link
Contributor Author

Ya the files I specified weren't obviously the only ones like I've said
before it's a deep rabbit hole in terms of things it touches and InitPath
is just another thing that removed by removing dockerinit ;) have fun

On Friday, December 11, 2015, Alexander Morozov notifications@github.com
wrote:

@sammyshj https://github.com/sammyshj InitPath shouldn't be needed
after removing.


Reply to this email directly or view it on GitHub
#18355 (comment).

@jessfraz
Copy link
Contributor Author

The original file path was merely the only one not in docker/docker so you
might want to start w the PR to libnetwork ;)
THEN you can vendor that change into docker
THEN you can worry about all the other stuff dockerinit touches

On Friday, December 11, 2015, Jessie Frazelle jess@docker.com wrote:

Ya the files I specified weren't obviously the only ones like I've said
before it's a deep rabbit hole in terms of things it touches and InitPath
is just another thing that removed by removing dockerinit ;) have fun

On Friday, December 11, 2015, Alexander Morozov <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

@sammyshj https://github.com/sammyshj InitPath shouldn't be needed
after removing.


Reply to this email directly or view it on GitHub
#18355 (comment).

@sambuddhabasu
Copy link
Contributor

Thanks for making things clear @LK4D4 and @jfrazelle . Working on it right now!

@gianarb
Copy link

gianarb commented Dec 17, 2015

Maybe this issue should be closed? :)
The pull is merged 👍

@LK4D4
Copy link
Contributor

LK4D4 commented Dec 17, 2015

@gianarb I think only in libnetwork. There is a long road ahead.

@mpl
Copy link

mpl commented May 19, 2016

@jfrazelle Hi. I I have some code that used to rely on the presence of /.dockerinit to detect whether it is run in a docker container (If not, log.Fatal with a warning so the users know they're not supposed to run that out of docker). What is the correct/suggested way to perform that sort of detection nowadays please?

@LK4D4
Copy link
Contributor

LK4D4 commented May 19, 2016

@mpl there is .dockerenv file, have no idea what it does though :)

@mika
Copy link
Contributor

mika commented Aug 21, 2016

@tianon so when you've code which previously checked for presence of /.dockerinit what's the proper way to handle this with recent versions of docker nowadays? Should /proc/1/cgroup be parsed (as done e.g. by puppet's facter tool) or is there any better/easier way? Thanks for any input :)

@LK4D4
Copy link
Contributor

LK4D4 commented Aug 22, 2016

@mika there is /.dockerenv :)

@mika
Copy link
Contributor

mika commented Aug 22, 2016

@LK4D4 which tianon recommended to not rely on: " I would not recommend
relying on its existence either (IIRC, that code you've linked to is the
only reason it still exists)" (quoting from #18355 (comment))

sipwise-jenkins pushed a commit to sipwise/rate-o-mat that referenced this issue Aug 30, 2016
…check accordingly

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I2d649f65c8bba50193171ec7fbfd20160ddfc319
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Aug 30, 2016
…check accordingly

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Oct 21, 2016
…check accordingly

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Oct 21, 2016
…check accordingly

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
ds82 added a commit to rea-jet/is-docker that referenced this issue Oct 27, 2016
docker removed /.dockerinit file and /.dockerenv is kind of deprecated.
This change therefore checks for /.dockerenv and the cgroup

See:
moby/moby#18355
moby/moby#19490
ds82 added a commit to rea-jet/is-docker that referenced this issue Oct 27, 2016
docker removed /.dockerinit file and /.dockerenv is kind of deprecated.
This change therefore checks for /.dockerenv and the cgroup

See:
moby/moby#18355
moby/moby#19490
geaaru added a commit to geaaru/docker-companion that referenced this issue Nov 10, 2017
geaaru added a commit to geaaru/docker-companion that referenced this issue Nov 10, 2017
geaaru added a commit to geaaru/docker-companion that referenced this issue Nov 10, 2017
geaaru added a commit to geaaru/docker-companion that referenced this issue Nov 11, 2017
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Jan 29, 2018
…check accordingly

The fix is comming from Mantis ticket 22099.

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
(cherry picked from commit 8a9bb07)
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Jan 29, 2018
…check accordingly

The fix is comming from Mantis ticket 22099.

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
(cherry picked from commit 8a9bb07)
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Jan 29, 2018
…check accordingly

The fix is comming from Mantis ticket 22099.

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Jan 29, 2018
…check accordingly

The fix is comming from Mantis ticket 22099.

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
(cherry picked from commit 8a9bb07)
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Jan 29, 2018
…check accordingly

The fix is comming from Mantis ticket 22099.

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
(cherry picked from commit 8a9bb07)
sipwise-jenkins pushed a commit to sipwise/ngcp-panel that referenced this issue Jan 29, 2018
…check accordingly

The fix is comming from Mantis ticket 22099.

File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:

| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145

See moby/moby#18355 and
moby/moby#19490 for details.

Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
(cherry picked from commit 6d35b85)
(cherry picked from commit 8a9bb07)
jordemort pushed a commit to jordemort/virt-what that referenced this issue Apr 13, 2020
/.dockerinit may no longer exist.

Ref moby/moby#18355
jordemort pushed a commit to jordemort/virt-what that referenced this issue Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants