2022-05-20

AWS CodeBuild: How to run tests that require starting Docker?

I have a Node.js project with Testcontainers used for staring Redis and Prostgress for tests.

I want to run these tests as a part of CI. For that purpose, I use an alpine image of Node.js with Docker installed on top of it. I can run tests that don't require Docker there, but if it involves Docker, I get this error from Testcontainers:

No Docker client strategy found

The tests run fine when I start them locally.

I haven't found anything in the CodeBuild documentation explaining connecting to the Docker Engine from inside a builder container. I found these instructions in the Testcontainers documentation, but I don't understand how to apply this in AWS Codebuild.

Q: How to run tests that require starting Docker in AWS CodeBuild?



No comments:

Post a Comment