-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile-platform-with-oracle-client
More file actions
28 lines (23 loc) · 1.42 KB
/
Dockerfile-platform-with-oracle-client
File metadata and controls
28 lines (23 loc) · 1.42 KB
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/2326100/oracle-instantclient-basic-23.26.1.0.0-1.el9.x86_64.rpm /tmp
ADD https://download.oracle.com/otn_software/linux/instantclient/2326100/oracle-instantclient-sqlplus-23.26.1.0.0-1.el9.x86_64.rpm /tmp
RUN dnf install -y libaio && dnf clean all && \
rpm -i /tmp/oracle-instantclient-basic-23.26.1.0.0-1.el9.x86_64.rpm /tmp/oracle-instantclient-sqlplus-23.26.1.0.0-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/23261/ojdbc17.jar /tmp
RUN rm -f /usr/local/tomcat/lib/ojdbc* && \
cp /tmp/ojdbc17.jar /usr/local/tomcat/lib && \
chmod go+r /usr/local/tomcat/lib/ojdbc17.jar && \
chown simplicite:simplicite /usr/local/tomcat/lib/ojdbc17.jar && \
rm -f /tmp/ojdbc17.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