code: function isDocker() {
      if (!isNode())
          return false;
      var hasEnv = function_1.tryWrap(function () {
          statSync('/.dockerenv');
          return true;
      })(false);
      var hasGroup = function_1.tryWrap(function () {
          return ~readFileSync('/proc/self/cgroup', 'utf8').indexOf('docker');
      })(false);
      return hasEnv || hasGroup;
  }
docs: Is Docker
  Checks if running inside Docker container.