Open TheOneTrueAnt opened 6 years ago
This is based on how it was implemented in the official Docker image from Oracle. The ORACLE_HOME
is not mounted on host and hence, any changes would not be preserved if the container was destroyed and re-created. Unfortunately, I will have to reject this PR and find a different solution.
Have solved an issue by using --mount. Unfortunately for a some reason it did not work from Windows and i had to run the command for the first time directly from docker VM.
docker run -d \ -p 32118:1521 \ -p 35518:5500 \ -e ORACLE_PWD=Oracle18 \ --name=oracle-xe \ --mount source=oracle-xe,target=/opt/oracle/oradata,volume-driver=local \ --network=oracle_network \ oracle-xe:18c
I tried with the same but parameter -e ORACLE_PWD=...
does not seem to have any effect.
Not a single clue what the password for sys
or system
is and how to use the DB.
Even worse when entering the docker container I can not logon to reset pwd:
sh-4.2# cd /opt/oracle/product/18c/dbhomeXE/
sh-4.2# ./bin/sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Nov 26 17:08:54 2019
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: system
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
I had the same running on my macbook before but somehow my APFS got corrupted and I had to format my disc and restart from scratch. As my docker mount before was on /data
and I now have catalina I can not reuse my time-machine backup for docker as the root FS is now read-only and prevents creating /data
(even as symlink). So I had to reinstall from scratch. Now I have an empty Oracle XE running in Docker but can neither connect as my password supplied as ORACLE_PWD does not seem to be the sys
or system
password and I do not know it nor can I reset PWD.
Also tried Oradoc_db1
and XEPDB1
as passwords cause I found those in your sources. Did not work either...
OK. Need to be oracle user and use this command instead:
[oracle@27b79a603a8e dbhomeXE]$ ./bin/sqlplus sys/Oracle18@localhost/XE as sysdba
@hohwille Can one script the change of the password so that an app can login? - I want to run OracleXE in an automated test. The passwrod seems to be set using the environment variable ORACLE_PASSWORD
in the Dockerfile
. Still having troubles to connect using Oracle's JDBC. --> Discussed at https://stackoverflow.com/q/10101517/873282
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 thenchown oracle:oinstall
them and everything seems fine. I assume we could copy them back out to the volume inshutdownDb.sh
to ensure they stay in-sync.Happy to put together a PR if I'm not missing something.