INNER CODE UNIT · JavaScript
dockerStartupTimeoutMS
localstack/serverless-localstack · src/index.js:497
const dockerStartupTimeoutMS = 1000 * 60 * 2;
const checkStatus = (containerID, timeout) => {
timeout = timeout || Date.now() + dockerStartupTimeoutMS;
if (Date.now() > timeout) {
this.log(
'Warning: Timeout when checking state of LocalStack container',
);
return;
}
return this.sleep(4000).then(() => {
this.log(`Checking state of LocalStack container ${containerID}`);
return exec(`docker logs "${containerID}"`).then((logs) => {
const ready = logs
.split('\n')
.filter((line) => line.indexOf('Ready.') >= 0);
if (ready.length) {
return Promise.resolve();