我创建了用于存储我的应用程序数据库数据的卷 -docker volume create dbvolume
.
然后我启动了带有 Oracle XE 11g 数据库映像和数据卷的 docker 容器。
docker run --name=OracleXE --shm-size=1g -p 1521:1521 -p 8080:8080 -e ORACLE_PWD=weblogic1 -v dbvolume:/opt/oracle/oradata oracle/database:11.2.0.2-xe
在数据库中存储一些条目。停止并删除容器,然后再次启动它,但数据库中没有保留任何数据。
如何获取对应用程序的后续请求的持久数据。
from https://github.com/oracle/docker-images/tree/master/OracleDatabase https://github.com/oracle/docker-images/tree/master/OracleDatabase
-v /opt/oracle/oradata
The data volume to use for the database.
Has to be writable by the Unix "oracle" (uid: 54321) user inside the container!
If omitted the database will not be persisted over container recreation.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)