How to set runner to delete containers later?

I have added an ec2 amazon linux 2 instance as docker runner to gitlab pipeline.
the ec2 instance deleting the container immediately after stage.
Is there anyway to just stop it? so that we can connect to it and check later.
And clean after 1 or 2 days.