docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

How to correctly create a container that does non persist over container recreation

Open doberkofler opened this issue 3 years ago • 0 comments

I understand that the Oracle Database container are configured to persist over container recreation by mapping a volume on the host system. In my use case I would like to create a database container that actually does not persist in order to consistently have the same data for end to end testing purposes. Is it possible and what would be the most appropriate way to solve my use case using the Oracle Database Docker Images?

doberkofler avatar Sep 14 '21 20:09 doberkofler

@doberkofler If you do not mount an external volume using -v option in the docker run command, the data will not be persistent. Every time, the container is recreated the data will not persist.

But for CI/CD or testing use-case I would suggest extending the base SIDB container image using the prebuiltdb extension. It reduces the container startup time to few seconds. Here also, every time a container gets recreated, the data will not persist.

abhisbyk avatar Sep 05 '22 08:09 abhisbyk