Skip to content

Instantly share code, notes, and snippets.

@gavvvr
Last active August 4, 2021 08:40
Show Gist options
  • Save gavvvr/9e0d3324b32637a08fb285ae0cf479a1 to your computer and use it in GitHub Desktop.
Save gavvvr/9e0d3324b32637a08fb285ae0cf479a1 to your computer and use it in GitHub Desktop.
Get dockerized Oracle 11 XE easily

Get dockerized Oracle 11 XE database easily

  • Clone official dockerfiles:
git clone https://github.com/oracle/docker-images oracle-docker-images
cd oracle-docker-images/OracleDatabase/SingleInstance/dockerfiles
  • Download Oracle 11 xe zip and put it to to ../dockerfiles/11.2.0.2 folder

  • Build an image: ./buildContainerImage.sh -v 11.2.0.2 -x

  • Start the database:

docker run --rm -it --name oracle -e ORACLE_PWD=oracle \
--shm-size="2g" -p9090:8080 -p1521:1521 \
oracle/database:11.2.0.2-xe

Notes:

  • notice the ORACLE_PWD variable used to set the password for system user
  • --shm-size parameter is important, without it you will get:
Error: The container doesn't have enough memory allocated.
A database XE container needs at least 1 GB of shared memory (/dev/shm).
You currently only have 64 MB allocated to the container.

Solution origin: oracle/docker-images#458 (comment)

@gavvvr
Copy link
Author

gavvvr commented Aug 4, 2021

UPD: Oracle 11 XE is not available at official Oracle website anymore: Refer to https://stackoverflow.com/a/61069731/3581539 to get zipped rpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment