GitShow/sindresorhus/is-docker
sindresorhus

is-docker

Check if the process is running inside a Docker container

by sindresorhus
Star on GitHubForknpm

JavaScript

235 stars15 forks7 contributorsQuiet · 11mo agoSince 2015v4.0.0MIT

Meet the team

See all 7 on GitHub →
sindresorhus
sindresorhus25 contributions
ds82
ds821 contribution
BendingBender
BendingBender1 contribution
HonkingGoose
HonkingGoose1 contribution
markacola
markacola1 contribution
dword-design
dword-design1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
jneisener
Detect docker during `docker build`MergedPR

I'm on macOS and have installed docker through Docker Desktop . Here is a simple demo of not recognizing docker during the build process: As we can see is not present, but is. Seems to me - at least at surface level - unlikely to pass outside of docker but to better detect the build process, at least on my platform

jneisener · 8mo ago
GCastilho
Failure to detect docker on 27.3.1 and Linux hostClosedIssue

It appears that detection fails on the latest docker version (27.3.1) of the host is Linux Upon investigation it seems that is now empty and the check for "docker" fails !image This is the ouput on docker v27.3.1 on a Windows host !image

GCastilho · 11mo ago
Ge11ert
Improve docker detectionClosedIssue

This package returns true when I try to run in in my own system (not in docker). I use Ubuntu 18.04 and the package version is 2.2.0. I suppose, positive match comes from the check Output of /proc/self/cgroup from the native system terminal: If I check it inside a docker container, the ouput of file is the next: I don't know from where the part comes from, so I can't say how it should be modified to run correctly. But now I had to go on previous version (where only "docker" in cgroups is being detected)

Ge11ert · 11mo ago
Structured data for AI agents

Repository: sindresorhus/is-docker. Description: Check if the process is running inside a Docker container Stars: 235, Forks: 15. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v4.0.0 (11mo ago). Open PRs: 0, open issues: 0. Last activity: 11mo ago. Community health: 85%. Top contributors: sindresorhus, ds82, BendingBender, HonkingGoose, markacola, dword-design.

·@ofershap

Replace github.com with gitshow.dev