GAGA LIFE.

インフラエンジニアブログ

スポンサーリンク

Docker上にOracle Database 18cを構築

概要

Oracle Database 18cのオンプレ版がリリースされました。
Docker(CentOS)にOracle Database EE 18.0.0.0(18.3)をインストールします。

環境情報

  • ホストOS:Windows 10
  • VirtualBox:Ver 5.2.16
  • ゲストOS:CentOS 7 64bit
  • Oracle:Oracle Database EE 18.0.0.0

手順概要

基本的に以下の公式の手順とスクリプトを使用して構築しています。

https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md

 1.Dockerイメージの準備(配置)
 2.buildDockerImage.shの動作確認
 3.インストールモジュール準備
 4.データベース環境作成
 5.データベース作成
 6.インスタンスへの接続確認

また、以前に下記の記事でインストールした12.2.0.1と方法は大きく変わりません。

手順説明

1.Dockerイメージの準備

https://github.com/oracle/docker-images

[Clone or download]ボタンを押してダウンロードしました。
※「docker-images/OracleDatabase/SingleInstance/dockerfiles」配下がデータベース用

2.buildDockerImage.shの動作確認

今回は、「/home/oracle」配下でダウンロードした「docker-images-master.zip」を解凍して実行しました。
/home/oracle/docker-images-master/OracleDatabase/SingleInstance/dockerfiles配下に「buildDockerImage.sh」が展開されます。hオプション(help)で実行確認します。

3.インストールモジュールの準備

下記OTNサイトから(ライセンスに同意し)ダウンロード

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-linux-12201-3608234.html?ssSourceSiteId=otnjp
ダウンロードファイル名:LINUX.X64_180000_db_home

ダウンロードしたファイルは、解凍せず(zip形式のまま)に以下のディレクトリ配下へ格納しています。
/home/oracle/docker-images-master/OracleDatabase/SingleInstance/dockerfiles/18.3.0

4.データベース環境作成

ファイルの配置とパーミッション等が整備されていれば、シェルスクリプトを実行するのみです。
それぞれの引数の意味はhelpから確認可能です。
[oracle@Gretsch dockerfiles]$ ./buildDockerImage.sh -h

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 18.3.0
-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

5.データベースの作成

以下の構成で作成しています。

  • MTA(マルチテナントアーキテクチャ) --> CDB(コンテナ)+1PDB(プラガブル)
  • 環境変数(コンテナ/プラガブル)

        ORACLE_SID=orcl
        ORACLE_PDB=pdb1

  • ポート構成

        DBへの接続ポート:1521
        EMへの接続ポート:5500

  • データのDockerホストへのマッピング先

        /mnt/oradata

  • 管理者ユーザパスワード

        起動(docker run実行)後、以下の文字列後に出力されます。
        今回の例では、「ZCqw5kkI0YA」(手順内の赤字部分)となります。

        ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN:

手順実行

■1.Dockerイメージの準備(配置)
[oracle@Gretsch dockerfiles]$ pwd
/home/oracle/docker-images-master/OracleDatabase/SingleInstance/dockerfiles
[oracle@Gretsch dockerfiles]$ ll
合計 20
drwxr-xr-x. 2 oracle docker 126 7月 24 07:21 11.2.0.2
drwxr-xr-x. 2 oracle docker 4096 7月 24 07:21 12.1.0.2
drwxr-xr-x. 2 oracle docker 4096 7月 24 07:21 12.2.0.1
drwxr-xr-x. 2 oracle docker 4096 7月 24 22:22 18.3.0
-rwxr-xr-x. 1 oracle docker 4171 7月 24 07:21 buildDockerImage.sh
■2.buildDockerImage.shの動作確認
[oracle@Gretsch dockerfiles]$ ./buildDockerImage.sh -h
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 18.3.0
-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
■3.インストールモジュール準備
[oracle@Gretsch 18.3.0]$ pwd
/home/oracle/docker-images-master/OracleDatabase/SingleInstance/dockerfiles/18.3.0
[oracle@Gretsch 18.3.0]$ ll
合計 4457744
-rw-r--r--. 1 oracle docker 63 7月 24 07:21 Checksum.ee
-rw-r--r--. 1 oracle docker 63 7月 24 07:21 Checksum.se2
-rw-r--r--. 1 oracle docker 2606 7月 24 07:21 Dockerfile.ee
-rw-r--r--. 1 oracle docker 2612 7月 24 07:21 Dockerfile.se2
-rwxrwxrwx. 1 oracle docker 4564649047 7月 24 21:53 LINUX.X64_180000_db_home.zip
-rwxr-xr-x. 1 oracle docker 1148 7月 24 07:21 checkDBStatus.sh
-rwxr-xr-x. 1 oracle docker 905 7月 24 07:21 checkSpace.sh
-rwxr-xr-x. 1 oracle docker 2953 7月 24 07:21 createDB.sh
-rw-r--r--. 1 oracle docker 6878 7月 24 07:21 db_inst.rsp
-rw-r--r--. 1 oracle docker 9204 7月 24 07:21 dbca.rsp.tmpl
-rwxr-xr-x. 1 oracle docker 2220 7月 24 07:21 installDBBinaries.sh
-rwxr-xr-x. 1 oracle docker 6140 7月 24 07:21 runOracle.sh
-rwxr-xr-x. 1 oracle docker 1015 7月 24 07:21 runUserScripts.sh
-rwxr-xr-x. 1 oracle docker 758 7月 24 07:21 setPassword.sh
-rwxr-xr-x. 1 oracle docker 894 7月 24 07:21 setupLinuxEnv.sh
-rwxr-xr-x. 1 oracle docker 678 7月 24 07:21 startDB.sh
■4.データベース環境作成(事前にoracleユーザーをdockerグループに所属させる)
[oracle@Gretsch dockerfiles]$ sudo usermod -g docker oracle
[oracle@Gretsch dockerfiles]$ sudo /bin/systemctl restart docker.service
[oracle@Gretsch dockerfiles]$ chmod -R 777 18.3.0/
[oracle@Gretsch dockerfiles]$ ./buildDockerImage.sh -v 18.3.0 -e
Checking if required packages are present and valid...
LINUX.X64_180000_db_home.zip: 完了
==========================
DOCKER info:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 50
Server Version: 18.03.1-ce
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-862.2.3.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.638GiB
Name: Gretsch
ID: R6PX:3ITF:FHHA:NRSS:2Q3J:XVBL:B2ER:VWQT:EDMN:C6CX:FLLB:UPWZ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
==========================
Building image 'oracle/database:18.3.0-ee' ...
Sending build context to Docker daemon 4.565GB
Step 1/17 : FROM oraclelinux:7-slim
---> c94cc930790a
Step 2/17 : MAINTAINER Gerald Venzl <gerald.venzl@oracle.com>
---> Running in 76b7836e8c0e
Removing intermediate container 76b7836e8c0e
---> 2645dd189c95
~(略)~
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
openssl x86_64 1:1.0.2k-12.0.1.el7 ol7_latest 492 k
oracle-database-preinstall-18c
x86_64 1.0-1.el7 ol7_latest 18 k
tar x86_64 2:1.26-34.el7 ol7_latest 845 k
unzip x86_64 6.0-19.el7 ol7_latest 169 k
Installing for dependencies:
GeoIP x86_64 1.5.0-11.el7 ol7_latest 1.1 M
acl x86_64 2.2.51-14.el7 ol7_latest 81 k
bc x86_64 1.06.95-13.el7 ol7_latest 114 k
bind-libs x86_64 32:9.9.4-61.el7 ol7_latest 1.0 M
bind-license noarch 32:9.9.4-61.el7 ol7_latest 85 k
bind-utils x86_64 32:9.9.4-61.el7 ol7_latest 204 k
binutils x86_64 2.27-28.base.el7_5.1 ol7_latest 5.9 M
compat-libcap1 x86_64 1.10-7.el7 ol7_latest 17 k
compat-libstdc++-33 x86_64 3.2.3-72.el7 ol7_latest 190 k
~(略)~
qrencode-libs x86_64 3.4.1-3.el7 ol7_latest 49 k
quota x86_64 1:4.01-17.el7 ol7_latest 178 k
quota-nls noarch 1:4.01-17.el7 ol7_latest 90 k
rpcbind x86_64 0.2.0-44.el7 ol7_latest 59 k
smartmontools x86_64 1:6.5-1.el7 ol7_latest 460 k
sysstat x86_64 10.1.5-13.el7 ol7_latest 310 k
systemd x86_64 219-57.0.1.el7 ol7_latest 5.0 M
systemd-libs x86_64 219-57.0.1.el7 ol7_latest 402 k
systemd-sysv x86_64 219-57.0.1.el7 ol7_latest 79 k
sysvinit-tools x86_64 2.88-14.dsf.el7 ol7_latest 62 k
tcp_wrappers x86_64 7.6-77.el7 ol7_latest 78 k
tcp_wrappers-libs x86_64 7.6-77.el7 ol7_latest 65 k
util-linux x86_64 2.23.2-52.el7 ol7_latest 2.0 M
xorg-x11-utils x86_64 7.5-22.el7 ol7_latest 113 k
xorg-x11-xauth x86_64 1:1.0.9-1.el7 ol7_latest 29 k
xz x86_64 5.2.2-1.el7 ol7_latest 228 k
Updating for dependencies:
libcom_err x86_64 1.42.9-12.el7_5 ol7_latest 40 k
libstdc++ x86_64 4.8.5-28.0.1.el7_5.1 ol7_latest 303 k
Transaction Summary
================================================================================
Install 4 Packages (+108 Dependent packages)
Upgrade ( 2 Dependent packages)
Total download size: 46 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
--------------------------------------------------------------------------------
Total 10 MB/s | 46 MB 00:04
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libcom_err-1.42.9-12.el7_5.x86_64 1/116
Installing : tcp_wrappers-libs-7.6-77.el7.x86_64 2/116
Installing : fipscheck-1.4.1-6.el7.x86_64 3/116
Installing : fipscheck-lib-1.4.1-6.el7.x86_64 4/116
Installing : gzip-1.5-10.el7.x86_64 5/116
Installing : cracklib-2.9.0-11.el7.x86_64 6/116
Updating : libstdc++-4.8.5-28.0.1.el7_5.1.x86_64 7/116
Installing : cracklib-dicts-2.9.0-11.el7.x86_64 8/116
~(略)~
Verifying : cronie-1.4.11-19.el7.x86_64 108/116
Verifying : GeoIP-1.5.0-11.el7.x86_64 109/116
Verifying : 2:tar-1.26-34.el7.x86_64 110/116
Verifying : compat-libstdc++-33-3.2.3-72.el7.x86_64 111/116
Verifying : systemd-sysv-219-57.0.1.el7.x86_64 112/116
Verifying : libpwquality-1.2.3-5.el7.x86_64 113/116
Verifying : 1:dbus-libs-1.10.24-7.0.1.el7.x86_64 114/116
Verifying : libcom_err-1.42.9-11.0.1.el7.x86_64 115/116
Verifying : libstdc++-4.8.5-28.0.1.el7.x86_64 116/116
Installed:
openssl.x86_64 1:1.0.2k-12.0.1.el7
oracle-database-preinstall-18c.x86_64 0:1.0-1.el7
tar.x86_64 2:1.26-34.el7
unzip.x86_64 0:6.0-19.el7
Dependency Installed:
GeoIP.x86_64 0:1.5.0-11.el7
acl.x86_64 0:2.2.51-14.el7
bc.x86_64 0:1.06.95-13.el7
bind-libs.x86_64 32:9.9.4-61.el7
bind-license.noarch 32:9.9.4-61.el7
bind-utils.x86_64 32:9.9.4-61.el7
binutils.x86_64 0:2.27-28.base.el7_5.1
compat-libcap1.x86_64 0:1.10-7.el7
compat-libstdc++-33.x86_64 0:3.2.3-72.el7
cracklib.x86_64 0:2.9.0-11.el7
cracklib-dicts.x86_64 0:2.9.0-11.el7
cronie.x86_64 0:1.4.11-19.el7
cronie-anacron.x86_64 0:1.4.11-19.el7
crontabs.noarch 0:1.11-6.20121102git.el7
cryptsetup-libs.x86_64 0:1.7.4-4.el7
dbus.x86_64 1:1.10.24-7.0.1.el7
dbus-libs.x86_64 1:1.10.24-7.0.1.el7
device-mapper.x86_64 7:1.02.146-4.0.2.el7
device-mapper-libs.x86_64 7:1.02.146-4.0.2.el7
dracut.x86_64 0:033-535.0.2.el7
e2fsprogs-libs.x86_64 0:1.42.9-12.el7_5
elfutils-default-yama-scope.noarch 0:0.170-4.el7
elfutils-libs.x86_64 0:0.170-4.el7
ethtool.x86_64 2:4.8-7.el7
~(略)~
make.x86_64 1:3.82-23.el7
net-tools.x86_64 0:2.0-0.22.20131004git.el7
nfs-utils.x86_64 1:1.3.0-0.54.0.1.el7
openssh.x86_64 0:7.4p1-16.el7
openssh-clients.x86_64 0:7.4p1-16.el7
pam.x86_64 0:1.1.8-22.el7
pkgconfig.x86_64 1:0.27.1-4.el7
procps-ng.x86_64 0:3.3.10-17.el7_5.2
psmisc.x86_64 0:22.20-15.el7
qrencode-libs.x86_64 0:3.4.1-3.el7
quota.x86_64 1:4.01-17.el7
quota-nls.noarch 1:4.01-17.el7
rpcbind.x86_64 0:0.2.0-44.el7
smartmontools.x86_64 1:6.5-1.el7
sysstat.x86_64 0:10.1.5-13.el7
systemd.x86_64 0:219-57.0.1.el7
systemd-libs.x86_64 0:219-57.0.1.el7
systemd-sysv.x86_64 0:219-57.0.1.el7
sysvinit-tools.x86_64 0:2.88-14.dsf.el7
tcp_wrappers.x86_64 0:7.6-77.el7
tcp_wrappers-libs.x86_64 0:7.6-77.el7
util-linux.x86_64 0:2.23.2-52.el7
xorg-x11-utils.x86_64 0:7.5-22.el7
xorg-x11-xauth.x86_64 1:1.0.9-1.el7
xz.x86_64 0:5.2.2-1.el7
Dependency Updated:
libcom_err.x86_64 0:1.42.9-12.el7_5 libstdc++.x86_64 0:4.8.5-28.0.1.el7_5.1
Complete!
~(略)~
Step 12/17 : USER oracle
---> Running in 3f080487eeb5
Removing intermediate container 3f080487eeb5
---> 8933361333d7
Step 13/17 : WORKDIR /home/oracle
Removing intermediate container 2791d10eca55
---> 99e63389ce67
Step 14/17 : VOLUME ["$ORACLE_BASE/oradata"]
---> Running in 08cf5d17938e
Removing intermediate container 08cf5d17938e
---> 6e0ca709442b
Step 15/17 : EXPOSE 1521 5500
---> Running in bbc8d7a45364
Removing intermediate container bbc8d7a45364
---> df25e017a730
Step 16/17 : HEALTHCHECK --interval=1m --start-period=5m CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
---> Running in 9f3bef559152
Removing intermediate container 9f3bef559152
---> 607b5b5a71a3
Step 17/17 : CMD exec $ORACLE_BASE/$RUN_FILE
---> Running in 0aabfb36585a
Removing intermediate container 0aabfb36585a
---> 085b58577b1f
Successfully built 085b58577b1f
Successfully tagged oracle/database:18.3.0-ee
Oracle Database Docker Image for 'ee' version 18.3.0 is ready to be extended:
:
--> oracle/database:18.3.0-ee
Build completed in 1621 seconds.
■5.データベース作成
[oracle@Gretsch dockerfiles]$ sudo mkdir -p /mnt/oradata
[sudo] oracle のパスワード:
[oracle@Gretsch dockerfiles]$ sudo chmod -R 777 /mnt/
$ docker run --name ora1830 -p 1521:1521 -p 5500:5500 -v /mnt/oradata:/opt/oracle/oradata -e ORACLE_SID=ora1830 -e ORACLE_PDB=pdb1 oracle/database:18.3.0-ee
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: ZCqw5kkI0YA=1
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 24-JUL-2018 14:11:56
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Starting /opt/oracle/product/18c/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /opt/oracle/product/18c/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/2b82d37c1875/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 24-JUL-2018 14:11:56
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/18c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/2b82d37c1875/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/ora1830.
Database Information:
Global Database Name:ora1830
System Identifier(SID):ora1830
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ora1830/ora1830.log" for further details.
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 14:26:40 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SQL>
System altered.
SQL>
Pluggable database altered.
SQL> Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
ls: cannot access /opt/oracle/oradata/ora1830/*/: No such file or directory
The Oracle base remains unchanged with value /opt/oracle
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################
The following output is now a tail of the alert.log:
Completed: alter pluggable database pdb1 open
2018-07-24T14:26:38.030755+00:00
PDB1(3):CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/ORA1830/pdb1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
PDB1(3):Completed: CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/ORA1830/pdb1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
PDB1(3):ALTER DATABASE DEFAULT TABLESPACE "USERS"
PDB1(3):Completed: ALTER DATABASE DEFAULT TABLESPACE "USERS"
2018-07-24T14:26:40.444801+00:00
ALTER SYSTEM SET control_files='/opt/oracle/oradata/ora1830/control01.ctl' SCOPE=SPFILE;
ALTER PLUGGABLE DATABASE pdb1 SAVE STATE
Completed: ALTER PLUGGABLE DATABASE pdb1 SAVE STATE
2018-07-24T15:06:14.267626+00:00
Resize operation completed for file# 3, old size 522240K, new size 532480K
■6.インスタンスへの接続確認
[oracle@Gretsch ~]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2b82d37c1875 oracle/database:18.3.0-ee "/bin/sh -c 'exec $O…" 7 hours ago Up 7 hours (unhealthy) 0.0.0.0:1521->1521/tcp, 0.0.0.0:5500->5500/tcp ora1830
3eb0624a21e9 oracle/database:12.1.0.2-ee "/bin/sh -c 'exec $O…" 2 months ago Exited (143) 2 months ago ora12102
b4eb3c10ed7d oracle/database:12.2.0.1-ee "/bin/sh -c 'exec $O…" 2 months ago Exited (143) 2 weeks ago ora12201
02c6716c60e9 hello-world "/hello" 2 months ago Exited (0) 2 months ago boring_heisenberg
[oracle@Gretsch ~]$ docker exec -it ora1830 /bin/bash
[oracle@2b82d37c1875 ~]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 21:08:33 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
----------------    ------------
ora1830              OPEN
SQL> show pdbs
 CON_ID CON_NAME               OPEN MODE RESTRICTED
---------- ------------------------------ ------------  ----------
             2 PDB$SEED                          READ         ONLY NO
             3 PDB1                                  READ         WRITE NO
SQL>

参考資料

https://github.com/oracle/docker-images

www.undercoverlog.com

スポンサーリンク