5.查看image情况
[root@zabsvr ~]# docker images docker.io/sath89/oracle-12c
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/sath89/oracle-12c latest b93c23bfc173 6 weeks ago 5.703 GB
6.启动docker
后面就可以用docker了
[root@zabsvr ~]# docker run -i -t docker.io/sath89/oracle-12c /bin/bash
Database is not configured. Please run '/entrypoint.sh' if needed. root@d4874f62c99e:/# /entrypoint.sh
Database not initialized. Initializing database.
Starting tnslsnr
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/xe/xe.log" for further details.
Configuring Apex console
Database initialized. Please visit http://#containeer:8080/emhttp://#containeer:8080/apex for extra configuration if needed
Starting web management console
PL/SQL procedure successfully completed.
Starting import from '/docker-entrypoint-initdb.d':
found file /docker-entrypoint-initdb.d//docker-entrypoint-initdb.d/*
[IMPORT] /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
Import finished
Database ready to use. Enjoy! ;)
^C
Session terminated, terminating shell...ORA-01013: user requested cancel of current operation
...terminated.
这里按ctrl +c
root@d4874f62c99e:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
6: eth0@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.2/16 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::42:acff:fe11:2/64 scope link
valid_lft forever preferred_lft forever
地址是 172.17.0.2
和公网的ip是不一样,
如果想进去,是否要用到防火墙的功能,地址伪装.这里先不管它了,如果想知道如何操作,搜一下摆渡吧.
oracle@d4874f62c99e:/u01/app/oracle/product/12.1.0/xe/bin$ ./sqlplus /nolog
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
oracle@d4874f62c99e:/u01/app/oracle/product/12.1.0/xe/bin$ ./sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Wed Aug 30 03:33:14 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount;
ORA-01012: not logged on
Process ID: 0
Session ID: 0 Serial number: 0
SQL> conn sys/oracle as sysdba
Connected to an idle instance.
SQL> startup
ORA-01012: not logged on
Process ID: 0
Session ID: 0 Serial number: 0