Installing testcontainers requires a lot of build tools #287
-
Hello @cristianrgreco , At first, thank you for contributing to the nodejs version of the package. This is a great feature. We are integrating micrioservice component and contract testing in our organization. We are doing this by creating isolated ecosystem for the microservices in the CI/CD pipeline. We use testcontainers to spawn required components (db, cache mem, etc) in docker container. Our docker images install npm packages during docker container build. Installing testcontainer npm requires a lot of build tooling like make, cmake, gcc, g++. python, etc. This is because testcontainers utilizes cpu-features package as dependency which needs to be built by node-gyp. This in turn makes our base docker images pretty huge something like 2.5G+. Is it possible to avoid package dependency which require build by aforementioned packages/tools? Or may be you can suggest some good solution here. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @armen-ch I've run an
I think then when you run your build, you can do |
Beta Was this translation helpful? Give feedback.
Hi @armen-ch
I've run an
npm list
and I see we're pulling incpu-features
as a dependency ofssh2
. Looking at thessh2
docs:I think then when you run your build, you can do
npm ci --no-optional
to skip it?