- Build ORDS Docker Image
- Run Container
- Container Parameters
This docker container will run ORDS in standalone mode.
The reason why this image is not posted on Docker Hub is due to Oracle requiring that you download and accept their terms and conditions for ORDS.
Download ORDS. I'll assume that this is stored in your
~/Downloads directory. The downloaded file will look like
-- Assuming that you have a folder called ~/docker/ords cd ~/docker/ords -- Clone this repo git clone https://github.com/martindsouza/docker-ords.git cd docker-ords -- Extract the ords.war file from the ords.zip download unzip ~/Downloads/ords.*.zip ords.war
Build ORDS Docker Image
Note: tagging with ORDS version number allows you to have multiple ORDS images for each ORDS release.
cd ~/docker/ords/docker-ords ORDS_VERSION=18.3.0 docker build -t ords:$ORDS_VERSION .
This image allows you to run the ORDS container to either generate the ORDS configuration or use an existing one. Full explanations of all the supported parameters is below.
Running the ORDS container this way will setup the ORDS configuration in the mapped volume drive (
/opt/ords) and only needs to be run once. The following commands demonstrate how to do this. It also has an optional
--rm parameter that will remove the container after first use. This is used since we can use a "simpler"
run command once the ORDS configuration exists. It also prevents the
-e variables which contain the passwords to be attached to a container.
#Note: DB_PORT is NOT the port that you mapped to your Oracle DB Docker image. It's the port that the database natively has open. # It's recommended to leave it as 1521 # Optional: If DB is in another Docker machine include: --network=<docker_network_name> \ # ~/docker/ords/ords-18.1.1/config is the directory where the ORDS configuration will be saved. If it doesn't exist Docker will create it. docker run -it --rm \ --network=oracle_network \ -e TZ=America/Edmonton \ -e DB_HOSTNAME=oracle \ -e DB_PORT=1521 \ -e DB_SERVICENAME=orclpdb513.localdomain \ -e APEX_PUBLIC_USER_PASS=oracle \ -e APEX_LISTENER_PASS=oracle \ -e APEX_REST_PASS=oracle \ -e ORDS_PASS=oracle \ -e SYS_PASS=Oradoc_db1 \ --volume ~/docker/ords/ords-18.1.1/config:/opt/ords \ --volume ~/docker/apex/5.1.3/images:/ords/apex-images \ -p 32513:8080 \ ords:18.1.1
On your laptop go to localhost:32513/ords.
In this case ORDS will assume that your configuration exists (found in the mapped
/opt/ords folder). A few differences to note from previous
- Includes a
nameattribute. This will allows to reference the container by name when using
docker start ordsand
docker stop ords.
- Does not include all database login information (since exists in configuration file)
- Does not self-remove
-d(detached mode - optional) is used so that it does not lock the current terminal screen
docker run -it -d \ --name=ords \ --network=oracle_network \ -e TZ=America/Edmonton \ --volume ~/docker/ords/ords-18.1.1/config:/opt/ords \ --volume ~/docker/apex/5.1.4/images:/ords/apex-images \ -p 32514:8080 \ ords:18.1.1
This container includes a healthcheck to ensure that ORDS is working properly:
docker ps # Should result in something like the following # Note the (healthy) status CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b7694a2d62ba ords:18.1.1 "/ords/config-run-or…" 15 hours ago Up 15 hours (healthy) 0.0.0.0:32513->8080/tcp ords
If you want to see the logs from ORDS that would normally output on the screen you can run:
docker logs ords
ords is the name of your container.
||Optional: Name to label container|
||Optional: If your database is part of a Docker network, attach this container to same network.|
||Optional: Timezone for ORDS|
||Hostname of Oracle DB|
||TNS port to DB. Note: If on a Docker Network don't use the mapped port. Most likely this will always be
||Directory that contains images for APEX|
||Optional: Directory to/that contains ORDS config. If this is not provided, the configuration will be saved in the container and will not be available if the container is deleted. If
Please read the development documentation for more info on how to help develop this Docker image.