-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile-platform-oracle
28 lines (22 loc) · 1.35 KB
/
Dockerfile-platform-oracle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ARG reg=registry.simplicite.io
ARG tag=6-latest
FROM $reg/platform:$tag
USER root
# Install the Oracle client (SQL*Plus, ...)
# ZZZ the URL bellow are just examples, you MUST use the appropriate client version that matches your Oracle server's version ZZZ
ADD https://download.oracle.com/otn_software/linux/instantclient/2340000/oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64.rpm /tmp
ADD https://download.oracle.com/otn_software/linux/instantclient/2340000/oracle-instantclient-sqlplus-23.4.0.24.05-1.el9.x86_64.rpm /tmp
RUN dnf install -y libaio && dnf clean all && \
rpm -i /tmp/oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64.rpm /tmp/oracle-instantclient-sqlplus-23.4.0.24.05-1.el9.x86_64.rpm && \
rm -f /tmp/*.rpm
# Install the Oracle JDBC driver
# ZZZ the URL bellow is just an example, you MUST use the appropriate JDBC driver version that matches your Oracle server's version ZZZ
ADD https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc11.jar /tmp
RUN rm -f /usr/local/tomcat/lib/ojdbc* && \
cp /tmp/ojdbc11.jar /usr/local/tomcat/lib && \
chmod go+r /usr/local/tomcat/lib/ojdbc11.jar && \
rm -f /tmp/ojdbc11.jar && \
echo "alias _sqlplus='/usr/bin/sqlplus \$DB_USER/\$DB_PASSWORD@//\$DB_HOST:\${DB_PORT:-1521}/\$DB_NAME'" >> /etc/profile.d/simplicite.sh
# Set Oracle encoding to UTF-8
ENV NLS_LANG=.AL32UTF8
USER simplicite