Skip to content
Menu
ChaoTic
  • Home
  • APEX
  • PL/SQL
  • Oralce DB
  • Docker
  • OCI
  • Nginx
  • C#
  • Linux
  • JavaScript
  • Privacy Policy
ChaoTic

ORDS 23.1 For Autonomous Database in Docker

Posted on June 24, 2023July 25, 2023

First create custom ords and plsql gateway user with ADMIN user in OCI ATP.

CREATE USER "ORDS_PUBLIC_USER_OCI" IDENTIFIED BY MY_PWD;
CREATE USER "ORDS_PLSQL_GATEWAY_OCI" IDENTIFIED BY MY_PWD;

GRANT CONNECT TO ORDS_PUBLIC_USER_OCI;
ALTER USER ORDS_PUBLIC_USER_OCI PROFILE UNLIMITED;

GRANT CONNECT TO ORDS_PLSQL_GATEWAY_OCI;
ALTER USER ORDS_PLSQL_GATEWAY_OCI PROFILE UNLIMITED;
ALTER USER ORDS_PLSQL_GATEWAY_OCI GRANT CONNECT THROUGH ORDS_PUBLIC_USER_OCI;

begin
   ords_admin.provision_runtime_role(p_user                  => 'ORDS_PUBLIC_USER_OCI'
                                    ,p_proxy_enabled_schemas => true);
end;
/
begin
   ords_admin.config_plsql_gateway(p_runtime_user       => 'ORDS_PUBLIC_USER_OCI'
                                  ,p_plsql_gateway_user => 'ORDS_PLSQL_GATEWAY_OCI');
end;
/
File structures

Dockerfile

install_ords.sh

jdk...

Wallet_*.zip

Docker File

$1 $2 $3 $4 $5 $6 $7 $8 are placeholders for

USER_NAME_ADMIN=$1

USER_NAME_ORDS=$2

USER_NAME_GATEWAY=$3

WALLET_LOCATION=$4 #full path

SERVICE_NAME=$5

PWD_ADMIN=$6

PWD_ORDS=$7

PWD_PLSQL=$8

FROM oraclelinux:7-slim
EXPOSE 8080
RUN yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/oracle/software/x86_64
#RUN yum upgrade && yum update
RUN yum update -y
RUN yum upgrade -y
RUN yum install ords -y
#USER oracle
#USER root
COPY ./Wallet*.zip /tmp
#USER root
COPY ./jdk-11.0.17_linux-x64_bin.rpm /tmp
RUN rpm -ivh /tmp/jdk-11*.rpm
WORKDIR /root
COPY ./install_ords.sh .
RUN bash -e install_ords.sh $1 $2 $3 $4 $5 $6 $7 $8
#RUN chown -R oracle:oinstall /opt/oracle

ENTRYPOINT ords serve

install_ords.sh

USER_NAME_ADMIN=$1
USER_NAME_ORDS=$2
USER_NAME_GATEWAY=$3
WALLET_LOCATION=$4   #full path 
SERVICE_NAME=$5
PWD_ADMIN=$6
PWD_ORDS=$7
PWD_PLSQL=$8

ords install adb --admin-user $USER_NAME_ADMIN --db-user $USER_NAME_ORDS --gateway-user $USER_NAME_GATEWAY  --wallet $WALLET_LOCATION  --wallet-service-name $SERVICE_NAME --feature-sdw TRUE --log-folder /tmp/ordsinstall.log --password-stdin << EOF
$PWD_ADMIN
$PWD_ORDS
$PWD_PLSQL
EOF

Read more about this syntax

Download Target ATP wallet and place it in the folder

Download jdk 11 and place it in the folder ( this may change in future ORDs versions)

To Build docker build -t ords_23_atp:1.0.0 .

To Run docker run -d -p 8088:8080 --name ords23_atp ords_23_atp:1.0.0 --restart unless-stopped

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Oracle OCI console Social Sign On with Microsoft and Google
  • Git CLI cheat sheets with Github
  • React js Learning Notes
  • Oracle APEX Mail Relay Docker
  • Linux Nano Cheat Sheets

Categories

  • APEX
  • C#
  • Docker
  • JavaScript
  • Linux
  • Nginx
  • OCI
  • Oralce DB
  • PL/SQL
  • Uncategorized
©2023 ChaoTic | Powered by SuperbThemes & WordPress
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT
Scroll Up