Releases: daggerok/oracle
oracle
Oracle Express Edition
NOTE: you can build same image by yourselves. read more
Usage
docker run -d --rm --name oracle-xe \
--shm-size=1g \
-p 1521:1521 \
-e ORACLE_PWD=password \
daggerok/oracle
available parameters (from original documentation):
--name
The name of the container (default: auto generated)
--shm-size
Amount of Linux shared memory
-p
The port mapping of the host port to the container port. Two ports are exposed: 1521 (Oracle Listener), 8080 (APEX)
-e ORACLE_PWD
The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)
-v /u01/app/oracle/oradata
The data volume to use for the database. Has to be writable by the Unix "oracle" (uid: 54321) user inside the container! If omitted the database will not be persisted over container recreation.
-v /u01/app/oracle/scripts/startup | /docker-entrypoint-initdb.d
-v /u01/app/oracle/scripts/setup | /docker-entrypoint-initdb.d
Optional: A volume with custom scripts to be run after database startup.
docker-compose
version: "2.1"
services:
oracle-xe:
image: daggerok/oracle:xe
environment:
ORACLE_PWD: password
ports:
- "1521:1521"
- "8080:8080"
volumes:
- "oracle-xe-data:/u01/app/oracle/oradata"
- "./db-startup-migration-scripts:/u01/app/oracle/scripts/startup"
- "./db-setup-migration-scripts:/u01/app/oracle/scripts/setup
networks: [backing-services]
restart: unless-stopped
volumes:
oracle-xe-data: {}
networks:
backing-services:
driver: bridge
How to build oracle-xe-11.2.0-1.0.x86_64.rpm using Travis CI
- create github repo
- create release
2.1. put here all needed files for build
2.2. set release name accordingly - create .travis.yml and put here logic needed for successful build
- use travis command to encrypt your Docker Hub account password
wget https://codeload.github.com/oracle/docker-images/zip/master -O docker-images-master.zip unzip docker-images-master.zip cd docker-images-master/OracleDatabase/SingleInstance/dockerfiles/ wget https://github.com/daggerok/oracle/releases/download/oracle/oracle-xe-11.2.0-1.0.x86_64.rpm.zip -O 11.2.0.2/oracle-xe-11.2.0-1.0.x86_64.rpm.zip bash ./buildDockerImage.sh -v 11.2.0.2 -x docker tag oracle/database:11.2.0.2-xe ${DOCKER_USERNAME}/oracle:11.2.0.2-xe echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin docker push ${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME}
- build, tag and push docker image
- add test do be used for newly created image (for example some spring-bot java app with oracle DB connection and as result showing database metadata)
Mac OS X sqlplus installation and usage
required running oracle in docker
# run oracle for example with ORACLE_PWD: password
# docker run ... -e ORACLE_PWD=password ... daggerok/oracle
# download and install sqlplus for Mac OS X
wget https://github.com/daggerok/oracle/releases/download/oracle/sqlplus-macos.x64-12.2.0.1.0-2.zip
unzip sqlplus-macos.x64-12.2.0.1.0-2.zip
export PATH=./sqlplus:$PATH
# connect and test queries execution
sqlplus system/password@//0.0.0.0/XE
SQL> select * from dual;
SQL> ...
SQL> quit
try sample
required running oracle in docker, sqlplus installed and bash / cygwin shell
# run oracle for example with ORACLE_PWD: password
# docker run ... -e ORACLE_PWD=password ... daggerok/oracle
wget https://github.com/daggerok/oracle/releases/download/oracle/sqlplus-sample.zip
unzip -d /tmp sqlplus-sample.zip
bash /tmp/sqlplus-sample/sqlplus-cmd.bash
# verify that `my_app` username / password schema should contains groups and users tables...