I want to ask when the container is up and running, where will it save the datafiles of database if persistence storage is not used?
It will save in the container layer. If you trash the container, you trash the data.
If you don't provide a mapping with the -v option Docker will create a anonymous volume for you. The data files are stored in that volume.
If you modify the Dockerfile and remove the VOLUME instruction altogether, the datafiles will be, as @brunoborges said, stored in the container itself and lost when the container is destroyed
@gvenzl can u point out in dockerfile where it is specified that it will create volume anonymous
Hi @Ijlalh90, the VOLUME instruction is specified here: https://github.com/oracle/docker-images/blob/master/OracleDatabase/dockerfiles/12.2.0.1/Dockerfile.ee#L74
Whether or not Docker creates a anonymous or named volume is up to the user. For more information on volumes I recommend the Docker documentation - Manage data in containers.
Most helpful comment
If you don't provide a mapping with the -v option Docker will create a anonymous volume for you. The data files are stored in that volume.
If you modify the Dockerfile and remove the VOLUME instruction altogether, the datafiles will be, as @brunoborges said, stored in the container itself and lost when the container is destroyed