Docker中的Oracle-卡在日志文件上的是:/home/oracle/setup/log/untarDB.log

ozxc1zmp  于 2023-01-12  发布在  Docker
关注(0)|答案(1)|浏览(87)

我尝试在Docker容器中启动Oracle 12.x,但启动序列始终停留在log file is : /home/oracle/setup/log/untarDB.log上,容器未正确启动。
我已经对版本www.example.com和12.2.0.1尝试了相同的步骤。12.1.0.2 and 12.2.0.1.
我所做的:
登录www.example.comcontainer-registry.oracle.com/database/enterprise:12.2.0.1
Oracle的Oracle凭据
1.登录www.example.com container-registry.oracle.com/database/enterprise:12.2.0.1

  1. Docker 拉动 container-registry.oracle.com/database/enterprise:12.2.0.1
    1.对接程序运行-d-名称对接程序Ora122-p 1521:1521-p 5500:5500-e ORACLE字符集= AL32UTF8-e ORACLE SID = GENAL32UTF8-e ORACLE PDB = GENAL32UTF8PDB-e ORACLE PWD =密码123 www.example.com container-registry.oracle.com/database/enterprise:12.2.0.1
Docker container log shows:
2023-01-09 06:50:56 Setup Oracle Database
2023-01-09 06:50:56 Oracle Database 12.2.0.1 Setup
2023-01-09 06:50:56 Mon Jan 9 05:50:56 UTC 2023
2023-01-09 06:50:56 
2023-01-09 06:50:56 Check parameters ......
2023-01-09 06:50:56 log file is : /home/oracle/setup/log/paramChk.log
2023-01-09 06:50:56 paramChk.sh is done at 0 sec
2023-01-09 06:50:56 
2023-01-09 06:50:56 untar DB bits ......
2023-01-09 06:50:56 log file is : /home/oracle/setup/log/untarDB.log

而且安装卡住了。
如果对数据库www.example.com执行相同的步骤,则运行正常,Docker容器启动,Oracle数据库在此容器中创建。(docker pull container-registry.oracle.com/database/enterprise:19.3.0.0)19.3.0.0 it works fine and docker conatainer is started and Oracle Database is created within this container. ( docker pull container-registry.oracle.com/database/enterprise:19.3.0.0 )
请告知12.x版本需要进行哪些更改才能正确启动Oracle Container。

ovfsdjhp

ovfsdjhp1#

您需要创建自己的本地映像。您不能使用DockerHub oracle映像,因为这些映像无效(不由Oracle维护)。
参考GitHub中的问题。例如:https://github.com/oracle/docker-images/issues/1165
请查找我为19.3执行的步骤。这些步骤源自文档https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/README.md
1.下载ZIP文件https://www.oracle.com/database/technologies/oracle-database-software-downloads.html- LINUX.X64_193000_db_home.zip

  1. Git克隆-https://github.com/oracle/docker-images.git
    1.将LINUX.X64_193000_db_home.zip复制到克隆目录(例如,复制到c:\tmp\OracleDocker\docker-images\OracleDatabase\单示例\docker文件\19.3.0\LINUX.X64_193000_db_home.zip)a.运行文件https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/dockerfiles/buildContainerImage.sh(如果您在Windows上,请使用cygwin或WSL 2 Ubutnu)b. WSL Ubuntu
  2. cd /mnt/c/tmp/OracledDocker/docker-images/OracleDatabase/SingleInstance/dockerfiles
  3. ./buildContainerImage.sh -v 19.3.0 -t oracle_ee_19.3.0 -e
    命令行日志:
/mnt/c/tmp/OracledDocker/docker-images/OracleDatabase/SingleInstance/dockerfiles# ./buildContainerImage.sh -v 19.3.0 -t oracle_ee_19.3.0 -e
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
Checking Docker version.
Checking if required packages are present and valid...
LINUX.X64_193000_db_home.zip: OK
==========================
Container runtime info:
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.13.0)
  dev: Docker Dev Environments (Docker Inc., v0.0.5)
  extension: Manages Docker extensions (Docker Inc., v0.2.16)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.22.0)

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 19
 Server Version: 20.10.21
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.4.72-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 24.95GiB
 Name: docker-desktop
 ID: Q43V:IGLX:SYFM:VX4M:LR2W:AK4S:K4QJ:AIIH:AA7H:Q2GR:OBG7:6KEL
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
==========================
Building image 'oracle_ee_19.3.0' ...
[+] Building 1000.0s (16/16) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                           0.1s
 => => transferring dockerfile: 5.09kB                                                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                                                              0.1s
 => => transferring context: 2B                                                                                                                                                0.0s
 => [internal] load metadata for docker.io/library/oraclelinux:7-slim                                                                                                          4.7s
 => [auth] library/oraclelinux:pull token for registry-1.docker.io                                                                                                             0.0s
 => [internal] load build context                                                                                                                                             79.6s
 => => transferring context: 3.06GB                                                                                                                                           79.6s
 => [base 1/4] FROM docker.io/library/oraclelinux:7-slim@sha256:884134b6d781eaa806df4dd4a4d83db0019e791bed8095e6dfdf81c3d6235d7f                                               9.1s
 => => resolve docker.io/library/oraclelinux:7-slim@sha256:884134b6d781eaa806df4dd4a4d83db0019e791bed8095e6dfdf81c3d6235d7f                                                    0.0s
 => => sha256:5047ab65cfa6bf7a7d280e0ab7e83e94ad04bd301eb7503a6cb5a80006112959 529B / 529B                                                                                     0.0s
 => => sha256:19d1d44a7ad155521760e3cc2b8ae06a32e81c2ac28a9ff529bd4760829e51d8 1.48kB / 1.48kB                                                                                 0.0s
 => => sha256:d26998a7c52d2b84e7927f97651d1d703a805c8e4d3f658a03138721f5a5dd44 49.82MB / 49.82MB                                                                               4.7s
 => => sha256:884134b6d781eaa806df4dd4a4d83db0019e791bed8095e6dfdf81c3d6235d7f 547B / 547B                                                                                     0.0s
 => => extracting sha256:d26998a7c52d2b84e7927f97651d1d703a805c8e4d3f658a03138721f5a5dd44                                                                                      3.6s
 => [base 2/4] COPY setupLinuxEnv.sh checkSpace.sh /opt/install/                                                                                                               0.9s
 => [base 3/4] COPY runOracle.sh startDB.sh createDB.sh createObserver.sh dbca.rsp.tmpl setPassword.sh checkDBStatus.sh runUserScripts.sh relinkOracleBinary.sh configTcps.sh  0.1s
 => [base 4/4] RUN chmod ug+x /opt/install/*.sh &&     sync &&     /opt/install/checkSpace.sh &&     /opt/install/setupLinuxEnv.sh &&     rm -rf /opt/install                245.4s
 => [builder 1/2] COPY --chown=oracle:dba LINUX.X64_193000_db_home.zip db_inst.rsp installDBBinaries.sh /opt/install/                                                         23.7s
 => [builder 2/2] RUN chmod ug+x /opt/install/*.sh &&     sync &&     /opt/install/installDBBinaries.sh ee                                                                   430.3s
 => [stage-2 1/4] COPY --chown=oracle:dba --from=builder /opt/oracle /opt/oracle                                                                                             147.0s
 => [stage-2 2/4] RUN /opt/oracle/oraInventory/orainstRoot.sh &&     /opt/oracle/product/19c/dbhome_1/root.sh                                                                  1.9s
 => [stage-2 3/4] WORKDIR /home/oracle                                                                                                                                         0.5s
 => [stage-2 4/4] RUN echo 'ORACLE_SID=${ORACLE_SID:-ORCLCDB}; export ORACLE_SID=${ORACLE_SID^^}' > .bashrc                                                                    0.9s
 => exporting to image                                                                                                                                                        38.5s
 => => exporting layers                                                                                                                                                       38.5s
 => => writing image sha256:4d049ba2dbcf6fee56282363c2ec5b78afe6adf0cb3ab9d5a2d6554070f2a63a                                                                                   0.0s
 => => naming to docker.io/library/oracle_ee_19.3.0                                                                                                                            0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

  Oracle Database container image for 'ee' version 19.3.0 is ready to be extended:

    --> oracle_ee_19.3.0

  Build completed in 1001 seconds.

现在你应该可以在你的Docker中找到Docker图像了。例如docker images

C:\>docker images
REPOSITORY                                                TAG                                                                          IMAGE ID       CREATED          SIZE
oracle_ee_19.3.0                                          latest                                                                       4d049ba2dbcf   11 minutes ago   6.67GB

现在,您可以启动Oracle容器:
docker run -d --name DockerOra193 -p 1521:1521 -p 5500:5500 -e ORACLE_CHARACTERSET=AL32UTF8 -e ORACLE_SID=GENAL32UTF8 -e ORACLE_PDB=GENAL32UTF8PDB -e ORACLE_PWD=password123 oracle_ee_19.3.0

相关问题