If you have used the annotations and extensions provided by Testcontainers, then the lifecycle of container instances is managed entirely by Testcontainers.
Please refer to the {url-testcontainers-docs}[offical Testcontainers documentation] for the information.
Please refer to the {url-testcontainers-docs}[official Testcontainers documentation] for the information.
When the containers are managed by Spring as beans, then their lifecycle is managed by Spring: