When I run a test in a `docker_environment` , is t...
# general
t
When I run a test in a
docker_environment
, is there an option that the docker container gets auto-deleted afterwards? It looks like it is not reusing the container on subsequent runs or stops and removes it.
f
yes the containers are not reused across runs. See https://github.com/pantsbuild/pants/blob/f7f487c59a3c58c846b48a18eb65342b75108acf/src/rust/engine/process_execution/docker/src/docker.rs#L525 which shuts down the "container cache" when a Pants session is shutdown. This is an area where contributions from the community could help improve the feature.
for example, caching the containers at the pantsd (pants daemon) level instead of per-run level
b
I reported this on GitHub some time ago
t
Thanks for the information!