Skip to Main Content

Developer Community

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Timesten-22- Error loading shared library ld-linux-x86-64.so.2

rohini pentaJan 19 2024 — edited Jan 19 2024

Hello Everyone,

I am using timesten 22.1.1.15.0 for my development.I am trying to build a docker image my application service jar with timesten client in it.

The below works but the image size after build is 2.5GB which is too much

# Dockerfile

FROM maven:3.6.3-openjdk-11
USER root

RUN mkdir /timesten

COPY timesten2211150.server.linux8664.zip /timesten/timesten2211150.server.linux8664.zip

#run yum -y install install unzip
RUN apt-get update && apt-get install unzip --no-install-recommends
RUN groupadd timesten
RUN useradd -g timesten timesten

RUN chown timesten:timesten /timesten
USER timesten:timesten

RUN unzip /timesten/timesten2211150.server.linux8664.zip -d /timesten/

RUN /timesten/tt22.1.1.15.0/bin/ttInstanceCreate -clientonly -name instance1 -location /timesten/

RUN rm -rf /timesten/timesten2211150.server.linux8664.zip

COPY target/app.jar /opt/app/

ENV LD_LIBRARY_PATH /timesten/instance1/install/lib:/timesten/instance1/install/ttoracle_home/instantclient
ENV CLASSPATH /timesten/instance1/install/lib/ttjdbc11.jar:/timesten/instance1/install/lib/orai18n.jar:/timesten/instance1/install/lib/timestenjmsxla.jar:/timesten/instance1/install/3rdparty/jms1.1/lib/jms.jar:.
ENV TIMESTEN_HOME /timesten/instance1

ENTRYPOINT java -jar /opt/app/app.jar

.Hence I tried to use multi stage build which results in this error Caused by: java.sql.SQLException: Problems with loading native library/missing methods: /timesten/tt22.1.1.15.0/lib/libttJdbcCS.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /timesten/tt22.1.1.15.0/lib/libttco.so)

Below is the docker file for multi stage build.

#docker file

FROM timesten-client-t22:latest as timestenclient # cilent only installation
FROM registry.docker.nat.bt.com/gmv/timesten-service-base

COPY --from=timestenclient /timesten/tt22.1.1.15.0/lib /timesten/tt22.1.1.15.0/lib
COPY --from=timestenclient /timesten/tt22.1.1.15.0/nls /timesten/tt22.1.1.15.0/nls

RUN chmod -R 755 /timesten

COPY target/app.jar /opt/app/

ENV LD_LIBRARY_PATH /timesten/tt22.1.1.15.0/lib
ENV CLASSPATH /timesten/tt22.1.1.15.0/lib/ttjdbc11.jar:/timesten/tt22.1.1.15.0/lib/orai18n.jar:.
ENV TIMESTEN_HOME /timesten/tt22.1.1.15.0

ENTRYPOINT java -jar app.jar

Could someone please help me with this.

Comments
Post Details
Added on Jan 19 2024
0 comments
287 views