Unable to create Client-Side Field Level Encryption enabled connection client with ATLAS in Java - Part2

@wan, this is continuation of my previous thread. I am not able to reply further on that thread.

As you have mentioned last, please find below our docker steps to deploy on Linux server.

FROM ${SWARM_REGISTRY}/bi-common-baseimages/openjdk:8.0.342 AS build-env

USER root
RUN microdnf install gnupg -y
RUN microdnf install wget -y
RUN microdnf install gpg -y

#Adding file contents to the microdnf repository for mongodb-enterprise
SHELL [“/bin/bash”, “-c”]
RUN echo $‘[mongodb-enterprise-4.4] \n
name=MongoDB Enterprise Repository \n
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/4.4/$basearch/ \n
gpgcheck=1 \n
enabled=1 \n
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc’ > /etc/yum.repos.d/mongodb-enterprise-4.4.repo

RUN microdnf install -y mongodb-enterprise-cryptd

#Adding file contents to the yum repository for libmongocrypt
SHELL [“/bin/bash”, “-c”]
RUN echo $‘[libmongocrypt] \n
name=libmongocrypt repository \n
baseurl=https://libmongocrypt.s3.amazonaws.com/yum/redhat/$releasever/libmongocrypt/1.6/x86_64 \n
gpgcheck=1 \n
enabled=1 \n
gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc’ > /etc/yum.repos.d/libmongocrypt.repo

RUN microdnf install -y libmongocrypt

To check where is mongocryptd and libmongocrypt

RUN whereis mongocryptd
RUN whereis libmongocrypt

COPY /target/execjar-java-encryption-1.0.2-SNAPSHOT.jar /usr/src/myapp/
WORKDIR /usr/src/myapp

CMD [“java”, “-jar”, “execjar-java-encryption-1.0.2-SNAPSHOT.jar”]

#CMD [“/bin/mongod.exe”]

#RUN mongocryptd.exe

@wan. we have our dedicated devops team there to support us. they own base image file. this is the content i see in there. our server is Linux. base image is ubi8. we have maven dependency. please check and provide any input if you have. thanks.

FROM docker-frameworkimage-rel.prodlb.travp.net/redhat.io/ubi8/openjdk-8:1.14-3

WORKDIR /usr/src/app

USER root


#Only for openjdk image, it seems to be missing yum
RUN microdnf install -y ca-certificates curl jq git unzip wget tzdata

ENV TZ America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN date

#Download and Upgrade Maven
RUN rm -Rf /usr/share/maven &&
wget https://dlcdn.apache.org/maven/maven-3/${MAVENVERSION}/binaries/apache-maven-${MAVENVERSION}-bin.tar.gz &&
tar -xvf apache-maven-${MAVENVERSION}-bin.tar.gz &&
mv apache-maven-${MAVENVERSION} /usr/share/maven &&
rm apache-maven-${MAVENVERSION}-bin.tar.gz

RUN groupadd -g ${PIPELINEGID} biwsusers &&
useradd -u ${PIPELINE_PRODUID} ${PIPELINE_PRODUSER} -g biwsusers &&
mkdir -p /usr/src/app &&
mkdir -p /home/${PIPELINE_PRODUSER}/.m2 &&
chown -R ${PIPELINE_PRODUSER}:biwsusers /home/${PIPELINE_PRODUSER} &&
chown -R ${PIPELINE_PRODUSER}:biwsusers /home/${PIPELINE_PRODUSER}/.m2 &&
chmod g+s /home/${PIPELINE_PRODUSER} &&
chmod -R 774 /home/${PIPELINE_PRODUSER} &&
chgrp -R biwsusers /usr/src/app &&
chmod g+s /usr/src/app &&
chmod -R 774 /usr/src/app


#Install maven settings
COPY java/ubi8/conf/settings-docker.xml /usr/share/maven/ref/
COPY java/ubi8/conf/settings-ent.xml $MAVEN_CONFIG
RUN mv ${MAVEN_CONFIG}/settings-ent.xml ${MAVEN_CONFIG}/settings.xml

COPY --from=docker-appimage-bi-snp.prodlb.travp.net/bi-common-builder/trv-certs:latest /certs /etc/pki/ca-trust/source/anchors
RUN update-ca-trust


@wan, Redhat UBI8 is our base image. we have same base image for .NET core as well. it is working flawlessly. problem is only with Java and Linux. Request you to check above code and please let me know If you have any findings. thanks.

@wan, any update on this? were you able to check on this ?