Clone the repository with the official Oracle docker images:
git clone https://github.com/oracle/docker-images
Install docker, download Oracle Database, put it to the directory docker-images/OracleDatabase/SingleInstance/dockerfiles/18.3.0 containing the Dockerfile and run the following commands to build and run Enterprise Edition:
cd docker-images/OracleDatabase/SingleInstance/dockerfiles/18.3.0
mv ~/Downloads/LINUX.X64_180000_db_home.zip .
# Fix a small bug in Dockerfile, see https://github.com/oracle/docker-images/issues/1468
sed -i 's/V981623-01/LINUX.X64_180000_db_home/g' Dockerfile
sudo docker build -t oracle/database:18.3.0 --build-arg DB_EDITION=EE .
sudo docker run -d -it --rm --name oracle18 oracle/database:18.3.0
sudo docker logs oracle18 --tail 100
sudo docker logs oracle18 | grep -i password
and the following commands to build and run Standard Edition 2 (it does not require V981623-01.zip):
sudo docker build -t oracle/database-se:18.3.0 --build-arg DB_EDITION=SE2 .
sudo docker run -d -it --rm --name oracle18se oracle/database-se:18.3.0
sudo docker logs oracle18se --tail 100
the first string of the docker output contains the generated password for SYS, SYSTEM and PDBADMIN.
(more…)