Chuck
Chuck

Reputation: 213

Why is DB data not being persisted from docker container?

I have created an Oracle 12c docker instance on my Mac(Sierra). I can do everything outlined in this link (bring it up, connect to it, create table, insert data):

https://www.toadworld.com/platforms/oracle/b/weblog/archive/2017/06/21/modularization-by-using-oracle-database-containers-and-pdbs-on-docker-engine

In the docker toolkit I have mapped a shared drive /Users/user/projects/database.

I am executing this command:

docker run --name oraclecdb \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_SID=ORCLCDB \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=oracle \
-v /Users/user/projects/database/oradata:/home/oracle/oradata \
oracle/database:12.2.0.1-ee

"oradata" gets created, but the pluggable database never gets persisted to the shared volume. So what am I missing?

Upvotes: 0

Views: 443

Answers (1)

Chuck
Chuck

Reputation: 213

Turns out that /home/oracle/oradata should be /opt/oracle/oradata

Upvotes: 1

Related Questions