- 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 forsystem
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)
UPD: Oracle 11 XE is not available at official Oracle website anymore: Refer to https://stackoverflow.com/a/61069731/3581539 to get zipped rpm