Create a gzipped tar archive suitable for docker load (an archive of the image with a created database and without volumes)

It is recommended to use large (>=20GB, the default is 10GB) Docker base volume size, for which Vagrant with Vagrantfile can be used.

# Build everything and save the created image to a file.
# This will echo something like this:
# Image saved to: /some/path/docker_img_oracle_database_created_YYYY-MM-DD.tgz
make all docker-save
# The saved image can be loaded from the file
# The image will be loaded with tag bofm/oracle12c:created
docker load < docker_img_oracle_database_created_YYYY-MM-DD.tgz
# Run the image in the new container
# Daemon
docker run -d --shm-size 1GB --name oracle_database -p 1521:1521 bofm/oracle12c:created
# Foreground
docker run -it --shm-size 1GB --name oracle_database -p 1521:1521 bofm/oracle12c:created

Compatibility

Limitations and Bugs

--shm-size option is required to mount /dev/shm to use Oracle's automatic memory management.

Oracle Database doesn't work with Docker ZFS storage driver by default. Check this issue for the workaround.

Database options and sample schemas installation through DBCA is a mystery. In this repo dbca is run with -sampleSchema true and db_template.dbt contains this line <option name="SAMPLE_SCHEMA" value="true"/>, but nothing happens, the database is always created without sample schemas. Well, that's Oracle Database after 30+ years of development.