Skip to content

Commit 39bf819

Browse files
committed
Updated Dockerfile
1 parent a1b89db commit 39bf819

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

java/Dockerfile-jar.template

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
# dockerfile for running the application from JAR
5-
FROM container-registry.oracle.com/java/jdk-no-fee-term:17
6-
ENV LD_PRELOAD=/opt/app/lib/libtfojdbc1.so
7-
ENV LD_LIBRARY_PATH=extracted_binaries_path:/usr/java/jdk-17/lib;
8-
9-
# TCP fastopen
10-
RUN sysctl -w net.ipv4.tcp_fastopen=5
11-
RUN sysctl -w net.ipv4.tcp_fastopen_blackhole_timeout_sec=0
5+
FROM container-registry.oracle.com/java/jdk-no-fee-term:23-oraclelinux9
126

137
RUN useradd -U -d /home/appuser appuser && \
148
mkdir /opt/app && \
@@ -17,6 +11,17 @@ RUN useradd -U -d /home/appuser appuser && \
1711
mkdir /opt/apm-agent && \
1812
chown appuser:appuser /opt/app /opt/apm /opt/apm-agent
1913

14+
# Download the Oracle JDBC TCP Fast Open (TFO) Library File
15+
WORKDIR /opt/app/lib
16+
RUN dnf install wget
17+
RUN curl https://oss.oracle.com/el4/unzip/unzip.tar -o unzip.tar
18+
RUN wget https://download.oracle.com/otn-pub/otn_software/jdbc/tfo-lib/v1/libtfojdbc1.so_aarch64.zip
19+
RUN tar -xf unzip.tar
20+
RUN ./unzip libtfojdbc1.so_aarch64.zip
21+
22+
ENV LD_PRELOAD=/opt/app/lib/libtfojdbc1.so
23+
ENV LD_LIBRARY_PATH=extracted_binaries_path:/usr/java/jdk-23/lib;
24+
2025
USER appuser
2126
WORKDIR /home/appuser
2227
# COPY --chown=appuser:appuser .oci .

0 commit comments

Comments
 (0)