1. 下载oracle-12.2.0.1的安装包并上传到服务器上。
  2. github下载文件并上传到服务器上
    注意:安装文件包要放到dockerfile/12.2.0.1目录中
  3. build oracle-docker镜像
./buildDockerImage.sh -v 12.2.0.1 -e -i

Usage: buildDockerImage.sh -v [version] [-e | -s | -x] [-i] [-o] [Docker build option]
Builds a Docker Image for Oracle Database.

Parameters:
   -v: version to build
       Choose one of: 11.2.0.2  12.1.0.2  12.2.0.1
   -e: creates image based on 'Enterprise Edition'
   -s: creates image based on 'Standard Edition 2'
   -x: creates image based on 'Express Edition'
   -i: ignores the MD5 checksums
   -o: passes on Docker build option

* select one edition only: -e, -s, or -x
  1. 运行镜像
    应该先设置一下主机上用来存放数据的目录权限:
    chmod 777 -R /vdb1/db/docker-oracle-data/
    要不然启动容器时创建数据库会提示权限不足。
docker run --name oracle12c \
-p 1521:1521 -p 5500:5500 \
-v  /vdb1/db/docker-oracle-data:/opt/oracle/oradata \
oracle/database:12.2.0.1-ee

原来oracle12c里新出一个CDB和PDB的概念,允许一个数据库容器(CDB)承载多个可插拔数据库(PDB)。
docker exec oracle/database:12.2.0.1-ee ./setPassword.sh <your password>

docker run --name <container name> \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_CHARACTERSET=<your character set> \
-v [<host mount point>:]/opt/oracle/oradata \
oracle/database:12.2.0.1-ee

Parameters:
   --name:        The name of the container (default: auto generated)
   -p:            The port mapping of the host port to the container port. 
                  Two ports are exposed: 1521 (Oracle Listener), 5500 (OEM Express)
   -e ORACLE_SID: The Oracle Database SID that should be used (default: ORCLCDB)
   -e ORACLE_PDB: The Oracle Database PDB name that should be used (default: ORCLPDB1)
   -e ORACLE_PWD: The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)
   -e ORACLE_CHARACTERSET:
                  The character set to use when creating the database (default: AL32UTF8)
   -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.
   -v /opt/oracle/scripts/startup | /docker-entrypoint-initdb.d/startup
                  Optional: A volume with custom scripts to be run after database startup.
                  For further details see the "Running scripts after setup and on startup" section below.
   -v /opt/oracle/scripts/setup | /docker-entrypoint-initdb.d/setup
                  Optional: A volume with custom scripts to be run after database setup.
                  For further details see the "Running scripts after setup and on startup" section below.

 

作者:潘祖龙
链接:https://www.jianshu.com/p/3dcc43640c3a
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

互联网金融系列-支付清算体系例子-下(理解日切)

笔者上一篇《互联网金融系列-支付清算体系介绍-上》已经比较全面的介绍了以银联为例子的支付清算体系,为了更好的理解里面的运作,本章以两个例子为重点,全...

阅读全文

互联网金融系列-支付清算体系介绍-上

一,支付清算体系的简介 支付清算体系是一个国家的金融基础设施,或说公共服务。我国由央行主管此事,目前大体维持“结算-清算”二级制的支付体系。通俗地讲,...

阅读全文

JDK8 – 当尝试使用Maven生成javadoc时,错误“javax.interceptor.InterceptorBinding未找到的类文件”javadoc plugin

我使用JDK8(尝试它在我的Eclipse工作区与Win x64 u25 JDK在Linux上由Jenkins发布 – jdk-8u20-linux-x64,两个相同的问题)。我有多模块Maven项目(我从包装类...

阅读全文

欢迎留言