Git Product home page Git Product logo

docker-oracle-xe's Introduction

Docker build for Oracle Database 18c Express Edition (XE)

IMPORTANT

This project is now obsolete with the release of version 21c. I have a temporary project to support the new release that you can find here. This is based on the official Docker files from Oracle. I strongly recommend tracking the latter.

I would like to take the opportunity to thank everyone who has contributed, and for your interest in this project.

Prerequisites

  1. Download the RPM from Oracle Technology Network and save to folder. We will assume it is in ~/Downloads/oracle-database-xe-18c-1.0-1.x86_64.rpm.

  2. Optional: Setup docker network: docker network create oracle_network. This is useful if you want other containers to connect to your database (ORDS for example). You can change oracle_network for any name you want, however this name will be used in all the code snippets below.

  3. Optional: Create a folder mkdir ~/docker/oracle-xe which will store your Oracle XE data to be preserved after the container is destroyed.

Build Image

-- Clone repo
git clone [email protected]:fuzziebrain/docker-oracle-xe.git

-- Set the working directory to the project folder
cd docker-oracle-xe

-- Copy the RPM to docker-odb18c-xe/files
cp ~/Downloads/oracle-database-xe-18c-1.0-1.x86_64.rpm files/

-- Build Image
docker build -t oracle-xe:18c .

Run Container

Note first time will take a a while to run for as the oracle-xe configure script needs to complete

docker run -d \
  -p 32118:1521 \
  -p 35518:5500 \
  --name=oracle-xe \
  --volume ~/docker/oracle-xe:/opt/oracle/oradata \
  --network=oracle_network \
  oracle-xe:18c
  
# As this takes a long time to run you can keep track of the initial installation by running:
docker logs oracle-xe

Run parameters:

Name Required Description
-p 1521 Required TNS Listener. 32118:1521 maps 32118 on your laptop to 1521 on the container.
-p 5500 Optional Enterprise Manager (EM) Express. 35518:5500 maps 35518 to your laptop to 5500 on the container. You can then access EM via https://localhost:35518/em
--name Optional Name of container. Optional but recommended
--volume /opt/oracle/oradata Optional (recommended) If provided, data files will be stored here. If the container is destroyed can easily rebuild container using the data files.
--network Optional If other containers need to connect to this one (ex: ORDS) then they should all be on the same docker network.
oracle-xe:18c Required This is the name:tag of the docker image that was built in the previous step

Container Commands

# Status:
# Look under the STATUS column for "(health: ...".
docker ps

# Start container
docker start oracle-xe

# Stop container
docker stop -t 200 oracle-xe

Other

SQL

Note sqlcl is an alias for SQLcl. Can also use sqlplus

-- Connect to CDB
sqlcl sys/Oracle18@localhost:32118/XE as sysdba


-- Connect to default PDB
sqlcl sys/Oracle18@localhost:32118/XEPDB1 as sysdba

APEX Install

An example to install APEX into the default container is available here.

SSH into Container

In some cases you may need to login to the server to modify or test something on the file system.

docker exec -it oracle-xe bash -c "source /home/oracle/.bashrc; bash"

# Once connected to run sqlplus:
$ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XE as sysdba
$ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XEPDB1 as sysdba


# Listener start/stop
$ORACLE_HOME/bin/lsnrctl stop
$ORACLE_HOME/bin/lsnrctl start

OEM

Note: Flash is required

https://localhost:35518/em

Creating a PDB

First connect to the CDB as sysdba: sqlcl sys/Oracle18@localhost:32118/XE as sysdba

-- Note XEPDB1 is created by default so demoing with XEPDB2
create pluggable database xepdb2 admin user pdb_adm identified by Oradoc_db1
  file_name_convert=('/opt/oracle/oradata/XE/pdbseed','/opt/oracle/oradata/XE/XEPDB2');

-- Running the following query will show the newly created PDBs but they are not open for Read Write:
select vp.name, vp.open_mode
from v$pdbs vp;

-- Open the PDB
alter pluggable database xepdb2 open read write;

-- If nothing is changed the PDBs won't be loaded on boot.
-- They're a few ways to do this
-- See for reference https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9531671900346425939
-- alter pluggable database pdb_name save state;
-- alter pluggable database all save state;
-- alter pluggable database all except pdb$seed open read write
alter pluggable database all save state;

To connect to the new PDB :

# Note: the password is the CDB SYS password, not the pdb_adm admin user
sqlcl sys/Oracle18@localhost:32118/XEPDB2 as sysdba

emp and dept tables

Install emp and dept sample tables:

@https://raw.githubusercontent.com/OraOpenSource/OXAR/master/oracle/emp_dept.sql

Preserving /opt/oracle/oradata for Multiple Copies

Each time you start a container that does has an empty /opt/oracle/oradata Oracle XE is configured and the data files are created for the CDB and one PDB (XEPDB1). If you plan to launch multiple separate containers for Oracle XE, it is unnecessary to spend this time waiting for the same base files to be created. The solution is fairly simple. It involves creating a sample/seed container, extracting the data files, then copying those data files each time you launch a new container for a new instance of Oracle XE. The following commands demonstrates how to do this:

docker run -d \
  --name=oracle-xe-seed \
  oracle-xe:18c

# Monitor the status:
docker logs oracle-xe-seed

# Once the Database is fully configured (you'll see a message like:)
# "The following output is now a tail of the alert.log:"
# Running docker ps oracle-xe-seed should also show status "(healthy)'
# Copy the oradata files tso a location (ex: ~/docker/oracle-xe)
# Note you'll probably want to store this in a shared NAS etc
docker cp oracle-xe-seed:/opt/oracle/oradata ~/docker/oracle-xe-seed

# You no longer need the container so stop and remove it
docker stop oracle-xe-seed
docker rm oracle-xe-seed

Each time you create a new instance of XE, copy the base oradata files and mount them as volume. The following examples shows how to create two copies of Oracle XE:

# Copy the data files for 01 and 02
cp  ~/docker/oracle-xe-seed ~/docker/oracle-xe01
cp  ~/docker/oracle-xe-seed ~/docker/oracle-xe02

# Start new containers
docker run -d \
  --name=oracle-xe01 \
  -p 32181:1521 \
  --network=oracle_network \
  --volume ~/docker/oracle-xe01:/opt/oracle/oradata \
  oracle-xe:18c

docker run -d \
  --name=oracle-xe02 \
  -p 32182:1521 \
  --network=oracle_network \
  --volume ~/docker/oracle-xe02:/opt/oracle/oradata \
  oracle-xe:18c

# You should see both containers running now:
docker ps

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                            PORTS                               NAMES
69b52a37a1c6        oracle-xe:18c       "/bin/sh -c 'exec ${…"   8 minutes ago       Up 8 minutes (health: starting)   5500/tcp, 0.0.0.0:32182->1521/tcp   oracle-xe02
14eea4c699d3        oracle-xe:18c       "/bin/sh -c 'exec ${…"   9 minutes ago       Up 9 minutes (health: starting)   5500/tcp, 0.0.0.0:32181->1521/tcp   oracle-xe01

Docker Developers

If you're interested in helping maintain this project check out docker-dev document.

docker-oracle-xe's People

Contributors

christianacca avatar fuzziebrain avatar martindsouza avatar tensau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-oracle-xe's Issues

Totally NOOB question...

New to docker containers

I am currently stuck here

Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/XE.
Database Information:
Global Database Name:XE
System Identifier(SID):XE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.

Connect to Oracle Database using one of the connect strings:
Pluggable database: be061a20d4d9/XEPDB1
Multitenant container database: be061a20d4d9
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE
The Oracle base remains unchanged with value /opt/oracle
Enabling XDB for external access

SQL*Plus: Release 18.0.0.0.0 - Production on Sun Feb 23 18:19:56 2020
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle. All rights reserved.

Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

SQL>
PL/SQL procedure successfully completed.

SQL>
PL/SQL procedure successfully completed.

SQL> Disconnected from Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0
The following output is now a tail of the alert.log:
XEPDB1(3):Resize operation completed for file# 10, old size 358400K, new size 368640K
2020-02-23T18:19:52.829359+00:00
XEPDB1(3):CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/XE/XEPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
2020-02-23T18:19:54.919553+00:00
XEPDB1(3):Completed: CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/XE/XEPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
XEPDB1(3):ALTER DATABASE DEFAULT TABLESPACE "USERS"
XEPDB1(3):Completed: ALTER DATABASE DEFAULT TABLESPACE "USERS"
2020-02-23T18:19:55.648034+00:00
ALTER PLUGGABLE DATABASE XEPDB1 SAVE STATE
Completed: ALTER PLUGGABLE DATABASE XEPDB1 SAVE STATE
root@ntbvahr:/docker-oracle-xe#
root@ntbvahr:/docker-oracle-xe#
root@ntbvahr:/docker-oracle-xe#
root@ntbvahr:/docker-oracle-xe# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
be061a20d4d9 oracle-xe:18c "/bin/sh -c 'exec ${…" 15 minutes ago Up 15 minutes (healthy) 0.0.0.0:32118->1521/tcp, 0.0.0.0:35518->5500/tcp oracle-xe
root@ntbvahr:/docker-oracle-xe# docker start oracle-xe
oracle-xe
root@ntbvahr:/docker-oracle-xe#
root@ntbvahr:/docker-oracle-xe#
root@ntbvahr:/docker-oracle-xe#
root@ntbvahr:/docker-oracle-xe# sqlcl sys/Oracle18@localhost:32118/XE as sysdba

Orden «sqlcl» no encontrada. Quizá quiso decir:

la orden «sqlc» del paquete snap «sqlc (1.0.0)»

Consulte «snap info » para ver más versiones.

root@ntbvahr:/docker-oracle-xe# sqlplus sys/Oracle18@localhost:32118/XE as sysdba
sqlplus: orden no encontrada
root@ntbvahr:/docker-oracle-xe# sqlcl sys/Oracle18@localhost:32118/XEPDB2 as sysdba

Orden «sqlcl» no encontrada. Quizá quiso decir:

la orden «sqlc» del paquete snap «sqlc (1.0.0)»

Consulte «snap info » para ver más versiones.

root@ntbvahr:/docker-oracle-xe#

I need help to acces to SqlCl or SQLPlus... thank you very much

Running elementary OS 5.1

Database exists

Database exists
cp: cannot stat '/opt/oracle/oradata/dbconfig/XE/oratab': No such file or directory
The Oracle Database is not configured. You must run '/etc/init.d/oracle-xe-18c configure' as the root user to configure the database.
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms///trace/alert*.log' for reading: No such file or directory
tail: no files remaining

Every time I start it gives me this error. If you anyone can help me out with that I would really appreciate it. Thanks

Add password & user credentials

Hi there,

Thank you for putting so much effort into this project.

As a regular software developer, with none experience working with Oracle DB's, I would have loved to just run a container coming from dockerhub directly....

  • What is the reason I can't find an official docker image for a oracle-xe database on dockerhub?

  • It would be great if you could add instructions on how we can create a container with our own user, password and database like the MYSQL and POSTGRES databases. See postgres example here.

  • It would also be great if you would have made this image accessible on dockerhub with some documentation how to use the image as well.

Again thank you for publishing this project.

Build got stuck

Hi,

I'm getting stuck on the build on the step 5

================================================================================
Package Arch Version Repository Size

Installing:
oracle-database-xe-18c
x86_64 1.0-1 /oracle-database-xe-18c-1.0-1.x86_64 5.2 G
Installing for dependencies:
file x86_64 5.11-36.el7 ol7_latest 56 k

Transaction Summary

Install 1 Package (+1 Dependent package)

Total size: 5.2 G
Total download size: 56 k
Installed size: 5.2 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : file-5.11-36.el7.x86_64 1/2
Installing : oracle-database-xe-18c-1.0-1.x86_64 2/2
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure Oracle Database XE, optionally modify the parameters in '/etc/sysconfig/oracle-xe-18c.conf' and then execute '/etc/init.d/oracle-xe-18c configure' as root.
Verifying : oracle-database-xe-18c-1.0-1.x86_64 1/2
Verifying : file-5.11-36.el7.x86_64 2/2

Installed:
oracle-database-xe-18c.x86_64 0:1.0-1

Dependency Installed:
file.x86_64 0:5.11-36.el7

Complete!

after the message complete appears the terminal stay stuck for hours, i would appreciate your help.

Rergards

Graceful stop of container is not possible due "workaround"

The last lines of runOracle.sh are:

# TODO workaround
tail -f /dev/null

This "workaround" (work around what) prevents a graceful shutdown of the container because the root process never ends - although the database was already shut down. T. m.,

docker stop -t 200 oracle-xe

takes always 200 seconds, even if the database shutdown only needs 30 seconds or so. After the timeout of 200s the container is killed.

This means that also a shutdown of docker (and therefore the complete workstation) takes at least 200 sec - at least if the timeout was defined by docker run --stop-timeout 200 ...).

Removing the tail-Statement solves that problem. Seems to bring no other problems.

Oracle seems to be very slow

I have successfully followed the instructions and created a Docker image of Oracle. I am now connecting to the image from another iMac on my home network.

I might add that I have no specific experience with Oracle, and given all the quirks I have so far encountered, anything might have gone wrong.

Is it my imagination or is Oracle painfully slow? I have created a handful of tables, and I am trying to insert a few thousand rows. It is taking me many minutes to do this.

I have tried from SQLPro Studio as well as Oracle’s SQL Developer for MacOS, and they are both very slow, so it’s not the front end software.

By comparison, when I connect a Docker instance of Microsoft SQL using SQL Pro Studio, the whole process takes a few seconds, so it’s not my network or the software.

2/2 Error unpacking rpm package oracle-database-xe-18c-1.0-1.x86_64

Hi,

I build the image docker build -t oracle-xe:18c . And i have this error :
Do you know what can be the reason ?

Total download size: 56 k
Installed size: 5.2 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : file-5.11-36.el7.x86_64                                      1/2 
  Installing : oracle-database-xe-18c-1.0-1.x86_64                          2/2**Error unpacking rpm package oracle-database-xe-18c-1.0-1.x86_64**
 
error: unpacking of archive failed on file /opt/oracle/product/18c/dbhomeXE/ctx/data/anl/lang/japanese/lex.obj;5edd18af: cpio: read
  Verifying  : file-5.11-36.el7.x86_64                                      1/2 
  Verifying  : oracle-database-xe-18c-1.0-1.x86_64                          2/2 

Dependency Installed:
  file.x86_64 0:5.11-36.el7                                                     

Failed:
  oracle-database-xe-18c.x86_64 0:1.0-1                                         

Complete!
The command '/bin/sh -c yum install -y oracle-database-preinstall-18c &&   yum install -y /tmp/${ORACLE_XE_RPM} &&   rm -rf /tmp/${ORACLE_XE_RPM}' returned a non-zero code: 1

Cannot stop container

Hello! There is a problem stopping the container.

# docker stop -t 200 oracle-xe

Gives me:

Error response from daemon: cannot stop container: oracle-xe: Cannot kill container 0c55d6632537145f42a2f72cc26c47210e3e0db9f01a54d9a146bf1ef5a59856: unknown error after kill: runc did not terminate sucessfully: container_linux.go:387: signaling init process caused "permission denied" : unknown

There is a problem with your environment because the Application Express files have not been loaded.

Hi,

after installing oracle-xe container, apex and ords-container I receive the following message, when I open the apex-page:

There is a problem with your environment because the Application Express files have not been loaded. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide. In addition, please verify that your image prefix path is correct. Your current path is /i/ (it should contain both starting and ending forward slashes, such as the default /i/). Use the SQL script reset_image_prefix.sql if you need to change it.

The docker run for the ords-container is:

docker run -t -i \ --name ords \ --network=oracle_network \ -e DB_HOSTNAME=oracle-xe \ -e DB_PORT=1521 \ -e DB_SERVICENAME=XEPDB1 \ -e APEX_PUBLIC_USER_PASS=oracle \ -e APEX_LISTENER_PASS=oracle \ -e APEX_REST_PASS=oracle \ -e ORDS_PASS=oracle \ -e SYS_PASS=Oracle18 \ --volume /Users/my_name/docker/apex/18.2/apex/images:/usr/local/tomcat/webapps/i \ -p 32713:8080 \ ords:18.3.0

And when I connect with the bash and look in the folder /usr/local/tomcat/webapps/i I see all apex-images-files.

Whats wrong?

Cannot alter password for XE/XEPDB1

The installation is very unclear, I was able install 18c on Container. But I cannot connect with SQL Develop Application to the database. I tried to change the password for sys (password will change but every-time I get same error invalid login info on sql developer).
I used this command on docker exec
sqlcl sys/Oracle18@localhost:32118/XEPDB2 as sysdba
SQL> Then used the Alter command to change password for sys
Password changes but cannot login.

Very slow startup time

Is it possible to improve the startup time somehow? Unfortunately it is way too slow in its current state. I'm wondering if its necessary to copy all the files etc for every container created, can't it be done earlier?

Can't install Apex

Please note that, I've changed the password in the Dockerfile. I've figured out that I have enter sys as sysdba as the user-name. Could you help me, what I'm doing wrong? Thanks!

bash-4.2# $ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XEPDB1 as sysdba @apex-install.sql Oradoc_db1

SQL*Plus: Release 18.0.0.0.0 - Production on Sun Jan 26 09:05:10 2020
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: sys as sysdba
Enter password: 

Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

old   3:   if '&admin_email.' is null then
new   3:   if '[email protected]' is null then
old   7:   if '&admin_pass.' is null then
new   7:   if 'Oradoc_db1' is null then

PL/SQL procedure successfully completed.

...set_appun.sql

PL/SQL procedure successfully completed.













...set_ufrom_and_upgrade.sql

PL/SQL procedure successfully completed.






PL/SQL procedure successfully completed.

Performing installation in multitenant container database in the background.
The installation progress is spooled into apexins_cdb*.log files.

Please wait...

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/apex/apexins_cdb_catcon_3589.lst]

catcon::set_log_file_base_path: catcon: See [/tmp/apex/apexins_cdb*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/tmp/apex/apexins_cdb_*.lst] files for spool files, if any

Diagnostic output produced in conjunction with reporting an error message:
{

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9604 catcon::catconInit2 - will retain last 1000 log messages by default

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:7088 catcon::get_log_file_base_path - no log file directory was specified - using current directory (/tmp/apex)
2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:7088 catcon::get_log_file_base_path - 

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:7093 catcon::get_log_file_base_path - log file base = apexins_cdb

2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9019 catcon::set_log_file_base_path - ALL catcon-related output will be written to [/tmp/apex/apexins_cdb_catcon_3589.lst]

2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9026 catcon::set_log_file_base_path - catcon: See [/tmp/apex/apexins_cdb*.log] files for output generated by scripts

2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9028 catcon::set_log_file_base_path - catcon: See [/tmp/apex/apexins_cdb_*.lst] files for spool files, if any

2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - 
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - 
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - catcon version: /st_rdbms_18.0/8
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path -  catconInit2: start logging catcon output at 2020-01-26 09:05:18
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - 
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - 
2020-01-26 09:05:18 INFO> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9034 catcon::set_log_file_base_path - 

2020-01-26 09:05:18 VERBOSE> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9626 catcon::catconInit2 - start initializing catcon

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9628 catcon::catconInit2 - base for log and spool file names = /tmp/apex/apexins_cdb

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9641 catcon::catconInit2 -   running catconInit2(

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       DebugOn = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       EchoOn = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       ErrorLogging = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       ExclCon = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       ExtParallelism = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       GUI = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       InclCon = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9644 catcon::catconInit2 -                       InternalUser = undefined

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       LogBase = apexins_cdb

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       LogDir = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       NoErrorLoggingIdent = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       NumProcs = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9653 catcon::catconInit2 -                       PerProcEndStmts = <empty array>

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9653 catcon::catconInit2 -                       PerProcInitStmts = <empty array>

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       RegularArgTag_ref = SCALAR(0x2a1a410)

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       ScriptDir = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9644 catcon::catconInit2 -                       ScriptUser = undefined

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       SecretArgTag_ref = SCALAR(0x2a1a518)

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       SeedMode = 99

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       SpoolOn = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       SqlplusDir = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       Upgrade = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9666 catcon::catconInit2 -                       UserScripts = 0

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9671 catcon::catconInit2 -                      )             (2020-01-26 09:05:18)

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9763 catcon::catconInit2 - running on linux; DoneCmd = 
2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9763 catcon::catconInit2 - host sqlplus -v >

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9785 catcon::catconInit2 - TWO_TASK was not set, so there is no need to unset it

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9791 catcon::catconInit2 - regular argument delimiter was not specified - defaulting to --p

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9798 catcon::catconInit2 - secret argument delimiter was not specified - defaulting to --P

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9921 catcon::catconInit2 - no EZConnect strings supplied - using default instance

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9959 catcon::catconInit2 - User Connect String = / AS sysdba

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:9963 catcon::catconInit2 - User password not specified

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:10015 catcon::catconInit2 - setting Internal Connect String to User Connect String

2020-01-26 09:05:18 VERBOSE> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:10018 catcon::catconInit2 - finished constructing connect strings

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:10028 catcon::catconInit2 - no source file directory was specified

2020-01-26 09:05:18 DEBUG> /opt/oracle/product/18c/dbhomeXE/rdbms/admin/catcon.pm:10036 catcon::catconInit2 - locate directory in $PATH that contains sqlplus binary

}
End of diagnostic output

catcon::catconInit2: sqlplus not in PATH.

Unexpected error encountered in catconInit2; exiting


Installation completed. Log files for each container can be found in:

apexins_cdb*.log

You can quickly scan for ORA errors or compilation errors by using a utility
like grep:

grep ORA- *.log
grep PLS- *.log

...set_appun.sql
...create APEX_LISTENER and APEX_REST_PUBLIC_USER users
Error: create user "APEX_LISTENER" identified by "oracle" account unlock default
tablespace  temporary tablespace TEMP
declare
*
ERROR at line 1:
ORA-00922: missing or invalid option
ORA-06512: at line 23
ORA-06512: at line 23
ORA-06512: at line 20


alter user APEX_PUBLIC_USER grant connect through APEX_REST_PUBLIC_USER
           *
ERROR at line 1:
ORA-01918: user 'APEX_PUBLIC_USER' does not exist


grant create session to APEX_LISTENER
                        *
ERROR at line 1:
ORA-01917: user or role 'APEX_LISTENER' does not exist


grant create session to APEX_REST_PUBLIC_USER
                        *
ERROR at line 1:
ORA-01917: user or role 'APEX_REST_PUBLIC_USER' does not exist


grant select on APEX_180200.wwv_flow_companies to APEX_LISTENER
                            *
ERROR at line 1:
ORA-00942: table or view does not exist


grant select on APEX_180200.wwv_flow_lsnr_workspaces to APEX_LISTENER
                            *
ERROR at line 1:
ORA-00942: table or view does not exist


grant select on APEX_180200.wwv_flow_lsnr_applications to APEX_LISTENER
                            *
ERROR at line 1:
ORA-00942: table or view does not exist


grant select on APEX_180200.wwv_flow_lsnr_entry_points to APEX_LISTENER
                            *
ERROR at line 1:
ORA-00942: table or view does not exist



PL/SQL procedure successfully completed.

grant insert, update, delete, select on APEX_180200.wwv_flow_rt$privileges to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$modules to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$templates to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$handlers to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$parameters to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$clients to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$client_privileges to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$approvals to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$approval_privs to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$pending_approvals to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$user_sessions to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant insert, update, delete, select on APEX_180200.wwv_flow_rt$privilege_groups to APEX_LISTENER
                                                    *
ERROR at line 1:
ORA-00942: table or view does not exist


grant select on APEX_180200.wwv_flow_rt$services to APEX_LISTENER
                            *
ERROR at line 1:
ORA-00942: table or view does not exist


grant select on APEX_180200.wwv_flow_rt$idm_privs to APEX_LISTENER
                            *
ERROR at line 1:
ORA-00942: table or view does not exist


grant select on APEX_180200.wwv_flow_rt$apex_account_privs to APEX_LISTENER
                            *
ERROR at line 1:
ORA-00942: table or view does not exist


grant execute on APEX_180200.wwv_flow_listener to APEX_LISTENER
                             *
ERROR at line 1:
ORA-04042: procedure, function, package, or package body does not exist


ERROR:
ORA-01435: user does not exist



Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.

ERROR:
ORA-01435: user does not exist


    wwv_flow_security.g_security_group_id := c_sgid;
    *
ERROR at line 6:
ORA-06550: line 6, column 5:
PLS-00201: identifier 'WWV_FLOW_SECURITY.G_SECURITY_GROUP_ID' must be declared
ORA-06550: line 6, column 5:
PL/SQL: Statement ignored
ORA-06550: line 8, column 5:
PLS-00201: identifier 'WWV_FLOW_LISTENER.INSTALL_PREREQ_DATA' must be declared
ORA-06550: line 8, column 5:
PL/SQL: Statement ignored
ORA-06550: line 10, column 8:
PLS-00201: identifier 'WWV_FLOW_PLATFORM.GET_PREFERENCE' must be declared
ORA-06550: line 10, column 5:
PL/SQL: Statement ignored


alter user apex_public_user identified by oracle account unlock
           *
ERROR at line 1:
ORA-01918: user 'APEX_PUBLIC_USER' does not exist


declare
*
ERROR at line 1:
ORA-46076: The specified name length not within valid range.
ORA-06512: at "SYS.XS_ADMIN_UTIL", line 53
ORA-06512: at "SYS.XS_ADMIN_UTIL", line 32
ORA-06512: at "SYS.XS$ACE_TYPE", line 23
ORA-06512: at line 12


  apex_util.set_security_group_id( 10 );
  *
ERROR at line 2:
ORA-06550: line 2, column 3:
PLS-00201: identifier 'APEX_UTIL.SET_SECURITY_GROUP_ID' must be declared
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
ORA-06550: line 3, column 3:
PLS-00201: identifier 'APEX_UTIL.CREATE_USER' must be declared
ORA-06550: line 3, column 3:
PL/SQL: Statement ignored
ORA-06550: line 9, column 3:
PLS-00201: identifier 'APEX_UTIL.SET_SECURITY_GROUP_ID' must be declared
ORA-06550: line 9, column 3:
PL/SQL: Statement ignored


Disconnected from Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

Error in PREIN scriptlet in rpm package oracle-database-xe-18c-1.0-1.x86_64

Running transaction
Installing : file-5.11-36.el7.x86_64 1/2
su: cannot open session: Permission denied
[SEVERE] The su command is not configured properly or the oracle user does not have the required privileges to install the Oracle database. If you are running in a Docker environment, ensure to set the environment variable ORACLE_DOCKER_INSTALL=true and try again.
error: %pre(oracle-database-xe-18c-1.0-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package oracle-database-xe-18c-1.0-1.x86_64

Encountered end of file

Following all the steps ai in the below process the failure occurred:

-- Build Image
docker build -t oracle-xe:18c .

Return description error:

Step 5/11 : RUN yum install -y oracle-database-preinstall-18c && yum install -y /tmp/${ORACLE_XE_RPM} && rm -rf /tmp/${ORACLE_XE_RPM}
---> Running in c279385e00ac
Loaded plugins: ovl
https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml: [Errno 14] curl#35 - "Encountered end of file"
Trying other mirror.

One of the configured repositories failed (Latest Unbreakable Enterprise Kernel Release 5 for Oracle Linux 7Server (x86_64)),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=ol7_UEKR5 ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable ol7_UEKR5
    or
        subscription-manager repos --disable=ol7_UEKR5

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=ol7_UEKR5.skip_if_unavailable=true

failure: repodata/repomd.xml from ol7_UEKR5: [Errno 256] No more mirrors to try.
https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml: [Errno 14] curl#35 - "Encountered end of file"

Issue while building oracle18c-xe docker image.

Hi,

I'm trying to create a docker image for oracle 18c-xe. I'm following https://github.com/fuzziebrain/docker-oracle-xe

But I'm see following error.

docker build -t oracle-xe:18c .
Sending build context to Docker daemon 2.574GB
Step 1/10 : FROM oraclelinux:7-slim
---> 90e39322df71
Step 2/10 : ENV ORACLE_PASSWORD=Welcome1 EM_GLOBAL_ACCESS_YN=Y ORACLE_DOCKER_INSTALL=true ORACLE_SID=XE ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE ORAENV_ASK=NO RUN_FILE=runOracle.sh SHUTDOWN_FILE=shutdownDb.sh EM_REMOTE_ACCESS=enableEmRemoteAccess.sh EM_RESTORE=reconfigureEm.sh ORACLE_XE_RPM=oracle-database-xe-18c-1.0-1.x86_64.rpm CHECK_DB_FILE=checkDBStatus.sh
---> Using cache
---> 8e536a18a52e
Step 3/10 : COPY ./files/${ORACLE_XE_RPM} /tmp/
---> Using cache
---> e9b229f3b557
Step 4/10 : RUN yum install -y oracle-database-preinstall-18c && yum install -y /tmp/${ORACLE_XE_RPM} && rm -rf /tmp/${ORACLE_XE_RPM}
---> Running in 609f041d6956
Loaded plugins: ovl
https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error"
Trying other mirror.

One of the configured repositories failed (Latest Unbreakable Enterprise Kernel Release 5 for Oracle Linux 7Server (x86_64)),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=ol7_UEKR5 ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable ol7_UEKR5
    or
        subscription-manager repos --disable=ol7_UEKR5

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=ol7_UEKR5.skip_if_unavailable=true

failure: repodata/repomd.xml from ol7_UEKR5: [Errno 256] No more mirrors to try.
https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error"
The command '/bin/sh -c yum install -y oracle-database-preinstall-18c && yum install -y /tmp/${ORACLE_XE_RPM} && rm -rf /tmp/${ORACLE_XE_RPM}' returned a non-zero code: 1

But I'm able to access https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml using Curl & browser.

Any assistance to resolve this issue will be a great help.

I'm running this on a mac.

Docker Info:
Containers: 22
Running: 2
Paused: 0
Stopped: 20
Images: 45
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan 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: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.93-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 5.818GiB
Name: linuxkit-025000000001
ID: KF6U:3OVX:72BJ:KUYC:MTOW:32TU:2T5X:66FK:Y3WY:GXX5:ASE6:33VR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true

Building an image with data from existing DB

Hi,

Have you tried building an image with some existing data?
I have a test-db which I would like to "convert" to a docker image. Having a clean db in the image means I would need to run a lot of sql scripts to create schemas/tables. Do you know of a good way to have that data within the image?

Unable to get this docker image to work.

Hello,

I'm unable to get this to work. I tried the latest on master branch as well as the 0.3.0 release.
My docker host is Ubuntu 14.04 running Docker version 18.06.1-ce, build e68fc7a

I'm using this downloaded RPM.

oracle-database-xe-18c-1.0-1.x86_64.rpm

Badness I noticed in the output:

. . .

  Installing : binutils-2.27-34.base.0.1.el7.x86_64                      11/117 
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
  Installing : GeoIP-1.5.0-13.el7.x86_64                                 12/117 

. . .

  Installing : systemd-219-62.0.4.el7_6.3.x86_64                         70/117 
Failed to get D-Bus connection: Operation not permitted
  Installing : elfutils-default-yama-scope-0.172-2.el7.noarch            71/117 

 . . .

  Installing : 1:smartmontools-6.5-1.el7.x86_64                          79/117 
  Installing : iputils-20160308-10.el7.x86_64                            80/117Error unpacking rpm package iputils-20160308-10.el7.x86_64
 
error: unpacking of archive failed on file /usr/bin/ping;5c54ecdb: cpio: cap_set_file
error: iputils-20160308-10.el7.x86_64: install failed
  Installing : initscripts-9.49.46-1.0.1.el7.x86_64                      81/117 
  Installing : gssproxy-0.7.0-21.el7.x86_64                              82/117 
  Installing : ksh-20120801-139.0.1.el7.x86_64                           83/117 
failed to link /usr/share/man/man1/ksh.1.gz -> /etc/alternatives/ksh-man: No such file or directory
. . .

Failed:
  iputils.x86_64 0:20160308-10.el7                                              

Complete!
The command '/bin/sh -c yum install -y oracle-database-preinstall-18c &&   yum install -y 
/tmp/${ORACLE_XE_RPM} &&   rm -rf /tmp/${ORACLE_XE_RPM}' returned a non-zero code: 1

I also have my own centos image I tried to use as a base. I use centos with an s6 overlay for many of my images.

cent7:7.6.1810

With that version I used:

oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
and
oracle-database-xe-18c-1.0-1.x86_64.rpm

I was able to get an image that started but I had commented out these lines:

HEALTHCHECK --interval=1m --start-period=2m --retries=10 \
  CMD "$ORACLE_BASE/scripts/$CHECK_DB_FILE"
CMD exec ${ORACLE_BASE}/scripts/${RUN_FILE}

I ran those commands by hand instead. (I was going to tweak the scripts for use in s6).

The listener came up but but the DB never did. It complained about kernel parameters.
I noticed some of parameters weren't changed by the preinstall scripting. Specifically shared memory.

I'm curious, do I need to alter the kernel parms on my docker host?

Looking forward to getting XE up to a newer version.

Thanks,
Glenn

The SID of the plugable Database is not known to SQL Developer.

I receive the following error:

Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

I can connect to the SID of XE with SQL Developer though. Also I can connect to the XEPDB1 and XEPDB2 by the comand line like stated in the example:

$ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XEPDB1 as sysdba

I restarted SQL-Developer and the container. It didn 't help.

Note: The only change I made was to map the ports directly -p 1521:1521


My specs:
Linux Mint 19.1 Cinnamon
Kernel: 4.15.0-20-generic

docker version

Client:
Version: 18.09.2
API version: 1.39
Go version: go1.10.4
Git commit: 6247962
Built: Tue Feb 26 23:52:23 2019
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 6247962
Built: Wed Feb 13 00:24:14 2019
OS/Arch: linux/amd64
Experimental: false

SQL-Developer:
Version 19.1.0.094

Git branch: Master

Installation fails due to sga_target being too small

Have tried this repo successfully yesterday on a local Ubuntu 18.04 host and now wanted to replicate on a brand new server host in our production environment.

When running docker run ... and looking into the logs, we do get the following error message:

[WARNING] ORA-00821: Specified value of sga_target 1536M is too small, needs to be at least 2416M
ORA-01078: failure in processing system parameters
[FATAL] ORA-01034: ORACLE not available

I have tried setting environment variables like SGA_TARGET or ORA_RMAN_SGA_TARGET or ORACLE_SGA_TARGET with much higher values but always get the same error.

Any idea on how I could tell the oracle installer to use a higher value for sga_target?

[SEVERE] The su command is not configured properly or the oracle user does not have the required privileges to install the Oracle database

Hello Alan,
thanks in advance for your work. I've tried it with Ubuntu 18.04.1 and docker 17.12.1-ce, but the following error is raised:

[SEVERE] The su command is not configured properly or the oracle user does not have the required privileges to install the Oracle database. If you are running in a Docker environment, ensure to set the environment variable ORACLE_DOCKER_INSTALL=true and try again.
error: %pre(oracle-database-xe-18c-1.0-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package oracle-database-xe-18c-1.0-1.x86_64
Verifying : file-5.11-33.el7.x86_64 1/2
Verifying : oracle-database-xe-18c-1.0-1.x86_64 2/2

Dependency Installed:
file.x86_64 0:5.11-33.el7

Failed:
oracle-database-xe-18c.x86_64 0:1.0-1

Complete!
The command '/bin/sh -c yum install -y oracle-database-preinstall-18c && yum install -y /tmp/${ORACLE_XE_RPM} && rm -rf /tmp/${ORACLE_XE_RPM}' returned a non-zero code: 1

runOracle.sh not properly detecting XE presence

runOracle.sh isn't detecting if XE already exists.

  • Create container (new DB files created)
  • Delete container
  • Create container (mountain same data files) and get following error:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
[FATAL] [DBT-06607] The data file (/opt/oracle/oradata/XE/system01.dbf) already exists on the file system.
   CAUSE: This configuration	is going to create the data file location (/opt/oracle/oradata/XE/system01.dbf). But it is detected that there is an existing database using this data file location or the data files from a previous configuration may be left behind.
   ACTION: Clean up the existing data files, or provide a different db_unique_name.

Database configuration failed. Check logs under '/opt/oracle/cfgtoollogs/dbca'.
ORACLE_HOME = [/home/oracle] ? ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID oracle.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /opt/oracle
/opt/oracle/scripts/enableEmRemoteAccess.sh: line 7: sqlplus: command not found
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
tail: no files remaining

can't log in as Apex admin

I've run the installs for docker-oracle-xe, + APEX, and docker-oracle-ords.
I then want to log to use ORDS; if i understand correctly, I need to create a workspace as the Apex Admin?
I try to log in to apex/apex_amin using ADMIN/Oradoc_db1, but it doesn't work.
Did I miss a step? I've started from scratch several times. I'm just trying to create Workspace to use for the login.

Can't connect as SYS on Docker for Windows

When running the container on Docker for Windows connecting as SYS from outside the container fails with incorrect username/password. This appears to be due to the orapwXE file being symlinked onto a windows filesystem where ownership cannot be changed or persisted.

Is there a reason (other than tidiness) these files are symlinked rather than copied in on startup? I've modified runOracle.sh to copy the files and then chown oracle:oinstall them and everything seems fine. I assume we could copy them back out to the volume in shutdownDb.sh to ensure they stay in-sync.

Happy to put together a PR if I'm not missing something.

Installing Oracle 18c XE fails on fresh install of Oracle Linux 7.6 UEK5

Running transaction
Installing : file-5.11-35.el7.x86_64 1/2
su: System error
[SEVERE] The su command is not configured properly or the oracle user does not have the required privileges to install the Oracle database. If you are running in a Docker environment, ensure to set the environment variable ORACLE_DOCKER_INSTALL=true and try again.
error: %pre(oracle-database-xe-18c-1.0-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package oracle-database-xe-18c-1.0-1.x86_64
Verifying : file-5.11-35.el7.x86_64 1/2
Verifying : oracle-database-xe-18c-1.0-1.x86_64 2/2

database dump

hello there,
how can i add an SQL script in order to create my database, before building the image so that it could be run every time i create a new container ?
Best regards.

Database creation fails

Docker respawns the container. I think it might be taking too long.

Database does not exists, configuring

Configuring Oracle Listener.

Listener configuration succeeded.

Configuring Oracle Database XE.

Enter SYS user password:

********� �

Enter SYSTEM user password:

******� �

Enter PDBADMIN User Password:


*******� �

Prepare for db operation

7% complete

Copying database files


29% complete

Creating and starting Oracle instance


30% complete


31% complete


34% complete


38% complete


41% complete


43% complete

Completing Database Creation


47% complete

Run custom init scripts on setup and/or startup

How about runnning scripts on setup/startup as described in official docs in section Running scripts after setup and on startup.

Seems it implemented in official repo with these commands in runOracle.sh:

# Execute custom provided startup scripts
runUserScripts $ORACLE_BASE/scripts/startup

su - cannot open session

Building fails:

Running transaction
  Installing : file-5.11-33.el7.x86_64                                      1/2 
su: cannot open session: Permission denied
[SEVERE] The su command is not configured properly or the oracle user does not have the required privileges to install the Oracle database. If you are running in a Docker environment, ensure to set the environment variable ORACLE_DOCKER_INSTALL=true and try again.
error: %pre(oracle-database-xe-18c-1.0-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package oracle-database-xe-18c-1.0-1.x86_64

the fact that the ORACLE_DOCKER_INSTALL is already set does not help :(

runOracle.sh failed

docker run -d -p 32118:1521 -p 35518:5500 --name=oracle-xe oracle-xe:18c

Unfortunately DB configuration does not work. The container starts, but orapwd fails,
probably because of the symbolic links referencing themselves under
/opt/oracle/oradata/dbconfig/XE

/opt/oracle/oradata/dbconfig/XE/orapwXE
can not be found.

Database does not exists, configuring
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
[WARNING] [DBT-09251] 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.
Enter SYS user password:


Enter SYSTEM user password:


Enter PDBADMIN User Password:


Prepare for db operation
7% complete
Copying database files
29% complete
100% complete
[FATAL] Error in Process: /opt/oracle/product/18c/dbhomeXE/bin/orapwd

Enter password for SYS:

OPW-00001: Unable to open password-file
7% complete
0% complete
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.

Database configuration failed. Check logs under '/opt/oracle/cfgtoollogs/dbca'.
The Oracle base remains unchanged with value /opt/oracle
Enabling XDB for external access

SQL*Plus: Release 18.0.0.0.0 - Production on Tue Feb 5 16:14:16 2019
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle. All rights reserved.

Connected to an idle instance.

SQL> BEGIN dbms_xdb_config.setlistenerlocalaccess(false); END;

ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

SQL> BEGIN dbms_xdb_config.setglobalportenabled(true); END;

ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

SQL> Disconnected
sed: can't read /opt/oracle/product/18c/dbhomeXE/network/admin/listener.oraF: No such file or directory
sed: can't read /opt/oracle/product/18c/dbhomeXE/network/admin/tnsnames.ora: No such file or directory
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms///trace/alert*.log' for reading: No such file or directory
tail: no files remaining

bash-4.2# cd /opt/oracle/oradata/dbconfig/XE/
bash-4.2# pwd
/opt/oracle/oradata/dbconfig/XE
bash-4.2# ls -la
total 12
drwxr-xr-x. 2 root root 4096 Feb 5 16:14 .
drwxr-xr-x. 3 root root 4096 Feb 5 16:10 ..
lrwxrwxrwx. 1 root root 44 Feb 5 16:10 listener.ora -> /opt/oracle/oradata/dbconfig/XE/listener.ora
lrwxrwxrwx. 1 root root 39 Feb 5 16:10 orapwXE -> /opt/oracle/oradata/dbconfig/XE/orapwXE
-rw-r--r--. 1 root root 779 Feb 5 16:14 oratab
lrwxrwxrwx. 1 root root 44 Feb 5 16:10 spfileXE.ora -> /opt/oracle/oradata/dbconfig/XE/spfileXE.ora
lrwxrwxrwx. 1 root root 42 Feb 5 16:10 sqlnet.ora -> /opt/oracle/oradata/dbconfig/XE/sqlnet.ora
lrwxrwxrwx. 1 root root 44 Feb 5 16:10 tnsnames.ora -> /opt/oracle/oradata/dbconfig/XE/tnsnames.ora

CentOS Linux release 7.5.1804 (Core)

docker version
Client:
Version: 18.09.1
API version: 1.39
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:35:01 2019
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:06:30 2019
OS/Arch: linux/amd64
Experimental: false

oracle-database-xe-18c-1.0-1.x86_64.rpm

Cannot clone git repository

Hello, I'm getting the following error message when attempting to clone the repository. When I run this command:

git clone [email protected]:fuzziebrain/docker-oracle-xe.git

I get this error message:

Cloning into 'docker-oracle-xe'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

My os information:
[root@rpm dev docker]# hostnamectl
Static hostname: rpm.dev.j2noc.com
Icon name: computer-vm
Chassis: vm
Machine ID: 44931f25aa05684f9b9b38726a251e12
Boot ID: bb6b63685be449b78454079fac5b11b1
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.21.1.el7.x86_64
Architecture: x86-64

Any ideas as to why I cannot clone the git repository?

Thanks!

cannot stat

docker run -p 32118:1521 -p 35518:5500 --name=oracle-xe --volume ~/docker/oracle-xe:/opt/oracle/oradata oracle-xe:18c

Database exists
cp: cannot stat '/opt/oracle/oradata/dbconfig/XE/oratab': No such file or directory
The Oracle Database is not configured. You must run '/etc/init.d/oracle-xe-18c configure' as the root user to configure the database.
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
tail: no files remaining

Hello, probably it's my fault but could you advise me what to do in such situation? Build passed successfully.

runOracle.sh is not detecting start vs configure

in runOracle.sh it isn't properly determining if it should configure or start the db.

  • Creating container the first time works
  • Delete container (but still keep mounted oradata volume)
  • Create new container (using same data) and get following:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
[FATAL] [DBT-06607] The data file (/opt/oracle/oradata/XE/system01.dbf) already exists on the file system.
   CAUSE: This configuration	is going to create the data file location (/opt/oracle/oradata/XE/system01.dbf). But it is detected that there is an existing database using this data file location or the data files from a previous configuration may be left behind.
   ACTION: Clean up the existing data files, or provide a different db_unique_name.

Database configuration failed. Check logs under '/opt/oracle/cfgtoollogs/dbca'.
ORACLE_HOME = [/home/oracle] ? ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID oracle.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /opt/oracle
/opt/oracle/scripts/enableEmRemoteAccess.sh: line 7: sqlplus: command not found
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
tail: no files remaining

no SPFILE is in use

So, i'm trying the following but getting an error. Any idea's how can i change the max_string_size?

alter system set max_string_size=EXTENDED SCOPE=SPFILE
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE is in use

Document how to pre-store oradata folder

For environments that want to launch Oracle XE quickly need to pre-load oradata folder onto shared drive then copy it. This ticket is to document the process.

Is it possible to move database configuration to the Dockerfile?

The ${ORACLE_CMD} configure stage takes a very long time, too long for my CI build to be able to do. I tried moving this step into the Dockerfile which builds the container successfully, but then, attempting to run sqlcmd yields the following error:

> $ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XE as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Fri Mar 1 08:55:15 2019
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.

ERROR:
ORA-12541: TNS:no listener

Is there any way around this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.