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
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

Java实现国密算法SM2,SM3,SM4,并且实现ECB和CBC模式

代码中实现了电码本ECB模式和密文分组连接CBC模式,SM3.java和SM4.java为算法实现类,utils的都是根据实现类写的工具,可以根据需要调用杂凑算法SM3的杂凑功...

阅读全文

Spring Data JPA使用复合主键

演示环境 MySQL 5.7 JDK1.8 spring-data-jpa 1.10.4.RELEASE hibernate 5.1.2.Final 这里演示一个余额宝的例子,一个用户一天一条记录,表示一个用户一天的收...

阅读全文

加密机相关

数据加密机主要用于实现对主机应用层数据加/解密、消息来源正确性验证、密钥管理等。全国大多数商业银行,城市一卡通系统、公交卡系统、社保卡系统、加油卡系...

阅读全文

欢迎留言