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

Detect Docker also using /.dockerenv #1400

Merged
merged 1 commit into from Dec 30, 2022
Merged

Detect Docker also using /.dockerenv #1400

merged 1 commit into from Dec 30, 2022

Conversation

scop
Copy link
Contributor

@scop scop commented Dec 28, 2022

Docker itself does that too, for example in https://github.com/moby/libnetwork/blob/1f3b98be6833a93f254aa0f765ff55d407dfdd69/drivers/bridge/setup_bridgenetfiltering.go#L161

/proc/self/cgroup doesn't necessarily contain "docker".

Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thank you!

@shirou shirou merged commit ca886f9 into shirou:master Dec 30, 2022
shirou added a commit that referenced this pull request Dec 30, 2022
@scop scop deleted the dockerenv branch December 30, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants