Is it possible to save the docker image of a failed CI job?

Because of our GitLab setup, we are unable to run the interactive web terminal or do any live debug of CI/CD jobs. It is difficult and time consuming to provision a local docker and repeat all of the CI/CD steps to try to reproduce the problem locally.

Alternatively, it would be great if when a CI job fails we’d have an option to freeze the docker image in the failure state and have it available for download so it can be delved into locally.

Our GitLab is self-managed, GitLab Enterprise Edition 14.10.0-ee

Thanks,
Dave