testcontainers-rs icon indicating copy to clipboard operation
testcontainers-rs copied to clipboard

Please add cpu and memory limits

Open bitemyapp opened this issue 9 months ago • 4 comments

bitemyapp avatar Mar 10 '25 17:03 bitemyapp

Deploy Preview for testcontainers-rust ready!

Name Link
Latest commit 54851fd9faf9b9cded9d681b46f87c056880d870
Latest deploy log https://app.netlify.com/sites/testcontainers-rust/deploys/67cf27913413cf00096b539d
Deploy Preview https://deploy-preview-776--testcontainers-rust.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 10 '25 17:03 netlify[bot]

Deploy Preview for testcontainers-rust ready!

Name Link
Latest commit fbe3f5462b6c67c8525153a19e1a9155d3bfab44
Latest deploy log https://app.netlify.com/sites/testcontainers-rust/deploys/67cf279d710f4b0008ed5dc3
Deploy Preview https://deploy-preview-776--testcontainers-rust.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 10 '25 17:03 netlify[bot]

Sorry, I somehow missed the PR. Thank you for the contribution.

This change introduces quite a lot of options, I don't even think testcontainers in other languages allows to change the defaults for these options. Not that common use-case for testing I guess.

However - the docker client is usually exposed (see docker_client_instance), so it's possible to update the container's config via update_container

Do we really need to expose these configs? We can create an issue and check if it's common request and update_container isn't enough for some reason

DDtKey avatar Mar 25 '25 14:03 DDtKey

This is definitely a useful change for testing with containers in constrained environments or when containers require licenses to run above certain resource limits.

Edit: This is functionality that's already provided in other languages.

jayakasadev avatar Jul 18 '25 15:07 jayakasadev