oracle11g docke搭建
- 先不挂载宿主机目录,用以下命令启动,或者将docker-compose中的volumes注释掉。启动有点慢,耐心等待。
docker run -d -p 11521:1521 \
-e ORACLE_ALLOW_REMOTE=true \
-e ORACLE_DISABLE_ASYNCH_IO=true \
-e ORACLE_ENABLE_XDB=true \
--name oracle11g \
oracleinanutshell/oracle-xe-11g
- 启动成功后将镜像内的
/u01/app/oracle/
此目录的文件cp到宿主机中。 - 在通过docker-compose 挂载宿主机目录启动。
version: '3'
services:
oracle11g:
image: oracleinanutshell/oracle-xe-11g
container_name: oracle11g
privileged: true
environment:
- TZ=Asia/Shanghai
- ORACLE_ALLOW_REMOTE=true
- ORACLE_DISABLE_ASYNCH_IO=true
- ORACLE_ENABLE_XDB=true
volumes:
- ./data/app/oracle/:/u01/app/oracle/
ports:
- 11521:1521
restart: always
4.链接信息
sid: xe
username: system
password: oracle
本文作者:xionghaizhi
本文链接:https://www.cnblogs.com/xionghaizhi/p/16397379.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步