…
docker run \ --name ora11xe -d \ -p 49160:22 \ -p 49161:1521 \ -v //mnt/data:/data \ -v /etc/localtime:/etc/localtime:ro \ -e ORACLE_ALLOW_REMOTE=true \ wnameless/oracle-xe-11g
Installation(with Ubuntu 16.04)
docker pull wnameless/oracle-xe-11g
docker run –name ora11xe -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g
Run this, if you want the database to be connected remotely:
docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g
Connect database with following setting:
hostname: localhost port: 49161 sid: xe username: system password: oracle
Password for SYS & SYSTEM
oracle
Login by SSH
ssh root@localhost -p 49160 password: admin
Support custom DB Initialization
# Dockerfile FROM wnameless/oracle-xe-11g ADD init.sql /docker-entrypoint-initdb.d/
用ssh進 container , 建立 tsdb
ssh root@localhost -p 49160 password: admin
create user tsdb profile default identified by password default tablespace users temporary tablespace temp account unlock;
grant dba to tsdb;
sqlplus / as sysdba
Enter user-name: system
Enter password: oracle
SQL> create user tsdb profile default
identified by password
default tablespace users
temporary tablespace temp
account unlock;
User created.
SQL> SQL> grant dba to tsdb;

create user tsdb profile default identified by password default tablespace users temporary tablespace temp account unlock; grant dba to tsdb; root@43b4858cfdeb:~# exp userid=xxxx/yyyy@172.25.0.227/tsdb tables=TBL_TS_IP_DAY_2017 file=/tmp/TBL_TS_IP_DAY_2017_$(date +%Y%m%d%s).dmp log=/tmp/log_database_$(date +%Y%m%d%s).log ROWS=Y time imp tsdb/password file=/tmp/TBL_TS_IP_DAY_2017_201703231490242301.dmp FULL=Y ignore=y feedback=1000000