'Save configurations of running containers in docker

I can't find a solution for the next case:

I have a docker and running on it through a Docker-Compose a set of containers; The state of the containers changed during operation;

For the purpose of the test, I want to reinstall the doctors and put another set of containers, but I do not want to lose the condition and configuration of those that I have launched now;

Can I create any archive from current containers / images and generate docker-compose.yaml to run them?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source