docker-container-id
This is a simple function to get the id of the docker container the current process is running in. Not tested for Windows containers.
npm install --save docker-container-id
The function returns a promise for the conatiner id.
const getId = ; { console;}
If you don't appear to be in a docker container, the promise resolves
with false
:
const getId = ; { let id = await ; if !id console; process; else // ... }