Zend certified PHP/Magento developer

Updating docker container with new image version but keeping configs

I have Docker’s container that runs an older version of phpMyAdmin. I need to update the phpMyAdmin to the latest version. The common solution here is to stop the current container and then getting the latest image of the phpMyAdmin then initiate a new container from it.

However this solution, as it is, is not suitable for me, because I modified the configurations of the current container before, I installed some additional themes, etc so I want to keep (at least) the configurations after update, such as networking ports, etc.

Is there any way to keep the configurations of the old container to be used in the new updated container?