Skip to content

Commit

Permalink
Updated Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeheust committed Feb 11, 2025
1 parent a1b89db commit 39bf819
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions java/Dockerfile-jar.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

# dockerfile for running the application from JAR
FROM container-registry.oracle.com/java/jdk-no-fee-term:17
ENV LD_PRELOAD=/opt/app/lib/libtfojdbc1.so
ENV LD_LIBRARY_PATH=extracted_binaries_path:/usr/java/jdk-17/lib;

# TCP fastopen
RUN sysctl -w net.ipv4.tcp_fastopen=5
RUN sysctl -w net.ipv4.tcp_fastopen_blackhole_timeout_sec=0
FROM container-registry.oracle.com/java/jdk-no-fee-term:23-oraclelinux9

RUN useradd -U -d /home/appuser appuser && \
mkdir /opt/app && \
Expand All @@ -17,6 +11,17 @@ RUN useradd -U -d /home/appuser appuser && \
mkdir /opt/apm-agent && \
chown appuser:appuser /opt/app /opt/apm /opt/apm-agent

# Download the Oracle JDBC TCP Fast Open (TFO) Library File
WORKDIR /opt/app/lib
RUN dnf install wget
RUN curl https://oss.oracle.com/el4/unzip/unzip.tar -o unzip.tar
RUN wget https://download.oracle.com/otn-pub/otn_software/jdbc/tfo-lib/v1/libtfojdbc1.so_aarch64.zip
RUN tar -xf unzip.tar
RUN ./unzip libtfojdbc1.so_aarch64.zip

ENV LD_PRELOAD=/opt/app/lib/libtfojdbc1.so
ENV LD_LIBRARY_PATH=extracted_binaries_path:/usr/java/jdk-23/lib;

USER appuser
WORKDIR /home/appuser
# COPY --chown=appuser:appuser .oci .
Expand Down

0 comments on commit 39bf819

Please sign in to comment.