|
Download Fore_End/cpcn2/node_modules/is-docker/readme.md from zxy0307/JavaWeb: direct link, hf CLI and curl.
- Browser
- Download file 341 Bytes
-
https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/is-docker/readme.md
- Command line
-
hf download hf://zxy0307/JavaWeb/Fore_End/cpcn2/node_modules/is-docker/readme.md
-
curl -L -o readme.md https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/is-docker/readme.md
341 Bytes
| # is-docker | |
| > Check if the process is running inside a Docker container | |
| ## Install | |
| ``` | |
| $ npm install is-docker | |
| ``` | |
| ## Usage | |
| ```js | |
| const isDocker = require('is-docker'); | |
| if (isDocker()) { | |
| console.log('Running inside a Docker container'); | |
| } | |
| ``` | |
| ## CLI | |
| ``` | |
| $ is-docker | |
| ``` | |
| Exits with code 0 if inside a Docker container and 2 if not. | |