Files for building an Oracle Data Guard database in Docker
Currently working for version 12.2.
Set Docker's memory limit to at least 8G
This repo is built on the Oracle Docker repository: https://github.com/oracle/docker-images
Download the following files from Oracle OTN:
LINUX.X64_193000_db_home.zip
The ORADATA_VOLUME is for persisting data for the databases. Each database will inhabit a subdirectory of ORADATA_VOLUME based on the database unique name. DG_DIR is the base directory for this repo.
export COMPOSE_YAML=docker-compose.yml
export DB_VERSION=12.2.0
export IMAGE_NAME=oracle/database:${DB_VERSION}-ee
export ORADATA_VOLUME=~/oradata
export DG_DIR=/root/DataGuard-docker
./buildDockerImage.sh -v 12.2.0 -e
make prepare_dir
make docker_up
docker-compose logs -f
The build has been tested by starting the databases under docker-compose and running DGMGRL validations and switchover through a variety of scenarios. It correctly resumes the configuration across stops/starts of docker-compose.
Please report any issues to oracle.sean@gmail.com. Thanks!
Customize a configuration file for setting up the contaner hosts using the following format if the existing config_dataguard.lst does not meet your needs. This file is used for automated setup of the environment.
The pluggable database is ${ORACLE_SID}PDB1. The default configuration is:
cat << EOF > $DG_DIR/config_dataguard.lst
# Host | ID | Role | DG Cfg | SID | DB_UNQNAME | DG_TARGET | ORACLE_PWD
DG11 | 1 | PRIMARY | DG1 | DG11 | DG11 | DG21 | oracle
DG21 | 2 | STANDBY | DG1 | DG11 | DG21 | DG11 | oracle
EOF