INNER CODE UNIT · JavaScript

getContainer

localstack/serverless-localstack · src/index.js:481

    const getContainer = () => {
      return exec('docker ps').then((stdout) => {
        const exists = stdout
          .split('\n')
          .filter(
            (line) =>
              line.indexOf('localstack/localstack') >= 0 ||
              line.indexOf('localstack/localstack-pro') >= 0 ||
              line.indexOf('localstack_localstack') >= 0,
          );
        if (exists.length) {
          return exists[0].replace('\t', ' ').split(' ')[0];
        }
      });
    };

    const dockerStartupTimeoutMS = 1000 * 60 * 2;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…