查看docker 某个容器的日志:docker logs -f <container-id>
[root@hgdb01 tequan]# docker logs 05378b0237ef
[!!!!!!] Failed to mount API filesystems, freezing.
[root@hgdb01 tequan]#
[root@hgdb01 tequan]#
[root@hgdb01 tequan]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
05378b0237ef oracle/database:12.2.0.1-ee "/usr/sbin/init" 6 minutes ago Up 6 minutes (health: starting) 1521/tcp, 5500/tcp, 0.0.0.0:1522->1522/tcp oracle-lei-tq
c238ae86aeff oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 5 hours ago Up 5 hours (healthy) 0.0.0.0:1521->1521/tcp, 5500/tcp oracle-lei-16
1fe5b8c13605 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-15
a7ed10b7b801 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-14
24f6e7b795dc oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-13
67616a6eb487 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-12
4a8a71b85373 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-11
034fbc4d5693 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-10
c494fe73fe26 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-9
c98ba513c5e1 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-8
2984ee02b03f oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-7
f9cc574a52a1 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-6
3b47eff0980d hello-world "/hello" 12 months ago Exited (0) 12 months ago vibrant_spence
fe9fdc979dc4 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-4
fae8be7aa126 oracle/database:12.2.0.1-ee "/bin/sh -c 'exec ..." 12 months ago Exited (1) 12 months ago oracle-lei-5
[root@hgdb01 tequan]# docker logs -f c238ae86aeff
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: SxHzC5GTUfY=1
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 20-APR-2019 11:50:50
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /opt/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /opt/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/c238ae86aeff/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 12.2.0.1.0 - Production
Start Date 20-APR-2019 11:50:52
Uptime 0 days 0 hr. 0 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/c238ae86aeff/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
[WARNING] [DBT-10102] The listener configuration is not selected for the database. EM DB Express URL will not be accessible.
CAUSE: The database should be registered with a listener in order to access the EM DB Express URL.
ACTION: Select a listener to be registered or created with the database.
Copying database files
1% complete
13% complete
25% complete
Creating and starting Oracle instance
26% complete
30% complete
31% complete
35% complete
38% complete
39% complete
41% complete
Completing Database Creation
42% complete
43% complete
44% complete
46% complete
47% complete
50% complete
Creating Pluggable Databases
55% complete
75% complete
Executing Post Configuration Actions
100% complete
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.
SQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 20 11:58:34 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
System altered.
SQL>
Pluggable database altered.
SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
The Oracle base remains unchanged with value /opt/oracle
#########################
DATABASE IS READY TO USE!
#########################
The following output is now a tail of the alert.log:
Completed: alter pluggable database ORCLPDB1 open
2019-04-20T11:58:33.252794+00:00
ORCLPDB1(3):CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/ORCLCDB/ORCLPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
ORCLPDB1(3):Completed: CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/ORCLCDB/ORCLPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
ORCLPDB1(3):ALTER DATABASE DEFAULT TABLESPACE "USERS"
ORCLPDB1(3):Completed: ALTER DATABASE DEFAULT TABLESPACE "USERS"
2019-04-20T11:58:34.852785+00:00
ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl' SCOPE=SPFILE;
ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
Completed: ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE