为了账号安全,请及时绑定邮箱和手机立即绑定

Docker快速搭建Oracle12c

标签:
Oracle



转载来源:https://hub.docker.com/r/sath89/oracle-12c/

 

Docker快速搭建Oracle12c

 

https://img1.sycdn.imooc.com//5c1c47750001065428501686.jpg

使用Docker命令拉取oracle-12c镜像

docker pull sath89/oracle-12c

启动并暴露8080&1521端口,8080可以登录网页端管理,1521是数据连接端口:

docker run -d -p 8080:8080 -p 1521:1521 sath89/oracle-12c

启动并暴露8080&1521端口,并且挂载宿主机目录 /my/oracle/data 到oracle服务器/u01/app/oracle目录,这样database数据就保存在本地宿主机上:

docker run -d -p 8080:8080 -p 1521:1521 -v /my/oracle/data:/u01/app/oracle sath89/oracle-12c

 启动并定制化DBCA总内存大小,DBCA_TOTAL_MEMORY (in Mb):

docker run -d -p 8080:8080 -p 1521:1521 -v /my/oracle/data:/u01/app/oracle -e DBCA_TOTAL_MEMORY=1024 sath89/oracle-12c

 Orale服务器连接参数:

hostname: localhostport: 1521sid: xeservice name: xeusername: systempassword: oracle

使用如下命令连接sqlplus:

 sqlplus system/oracle@//localhost:1521/xe

Password for SYS & SYSTEM:

oracle

 Oracle Web管理端连接参数:

http://localhost:8080/apexworkspace: INTERNALuser: ADMINpassword: 0Racle$

Apex upgrade up to v 5. (配置Apex   Oracle Application Express)*

docker run -it --rm --volumes-from ${DB_CONTAINER_NAME} --link ${DB_CONTAINER_NAME}:oracle-database -e PASS=YourSYSPASS sath89/apex install

Details could be found here: https://github.com/MaksymBilenko/docker-oracle-apex

Oracle Enterprise Management console (Oracle企业管理控制台):

http://localhost:8080/emuser: syspassword: oracleconnect as sysdba: true

 配置环境变量参数,关闭Web CONSOLE:

docker run -d -e WEB_CONSOLE=false -p 1521:1521 -v /my/oracle/data:/u01/app/oracle sath89/oracle-12c#You can Enable/Disable it on any time

启动Oracle,并加载初始化脚本:

docker run -d -p 1521:1521 -v /my/oracle/data:/u01/app/oracle -v /my/oracle/init/SCRIPTSorSQL:/docker-entrypoint-initdb.d sath89/oracle-12c

By default Import from docker-entrypoint-initdb.d is enabled only if you are initializing database (1st run).

To customize dump import use IMPDP_OPTIONS env variable like -e IMPDP_OPTIONS="REMAP_TABLESPACE=FOO:BAR" To run import at any case add -e IMPORT_FROM_VOLUME=true

In case of using DMP imports dump file should be named like ${IMPORT_SCHEME_NAME}.dmp

User credentials for imports are ${IMPORT_SCHEME_NAME}/${IMPORT_SCHEME_NAME}

If you have an issue with database init like DBCA operation failed, please reffer to this issue

TODO LIST

  • Web management console HTTPS port

  • Add functionality to run custom scripts on startup, for example User creation

  • Add Parameter that would setup processes amount for database (Currently by default processes=300)

  • Spike with clustering support

  • Spike with DB migration from 11g

In case of any issues please post it here.


点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消