Docker Community Forums

Share and learn in the Docker community.

Jest-dynamodb tests - ECONNREFUSED

I am trying to run this jest dependency within a docker container, it should build locally running instance of dynamodb and then run tests against it.
After I run yarn test command it takes some time and outputs:

Error: connect ECONNREFUSED
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
error Command failed with exit code 1.
info Visit for documentation about this command.

I tried monitoring what happens with lsof and ps aux, and it seems that dynamo instance is running for some time and then before the tests start it gets shutdown.
It all works perfectly fine on my local machine.

I honestly run out of ideas about what to do about it, has anyone had a similar problem?