async function getContainerIdFromMountInfo() {
  const mountInfoFile = '/proc/self/mountinfo';
  try {
    // We try if the mountinfo file exist in the container
    await fs.promises.access(mountInfoFile, fs.constants.F_OK);
    // container id not found return undefined
    const mountinfo = await fs.promises.readFile(mountInfoFile, 'utf-8');
    let containerId;
    if (mountinfo.indexOf('/docker/containers/') !== -1) {
      const allLines = mountinfo.split('\n');
      const lineWithDocker = allLines.find((line) => line.indexOf('/docker/containers/') !== -1);
      [, containerId] = /\/docker\/containers\/(\w+)/gm.exec(lineWithDocker);
    }
    return containerId;
  } catch (e) {
    // container id not found return undefined
    return undefined;
  }
}
@description Returns the containerId found on /proc/self/mountinfo.
@returns {Promise} Resolve with container id or undefined.
@example
const containerId = await getContainerIdFromMountInfo();