Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docker/mongodb-agent/Dockerfile.atomic
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ RUN case ${TARGETPLATFORM} in \
&& mkdir -p /tools \
&& curl -o /tools/mongodb_tools.tgz "${mongodb_tools_url}/${MONGODB_TOOLS_VERSION}"

RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
&& rm /tools/mongodb_tools.tgz
RUN tar xfz /tools/mongodb_tools.tgz \
&& mv mongodb-database-tools-*/bin/* /tools \
&& chmod +x /tools/* \
&& rm /tools/mongodb_tools.tgz \
&& rm -r mongodb-database-tools-*

FROM --platform=${BUILDPLATFORM} registry.access.redhat.com/ubi9/ubi-minimal AS agent_downloader

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ else
ln -sf "${MONGOD_ROOT}/bin/mongod" ${mdb_downloads_dir}/mongod/bin/mongod
ln -sf "${MONGOD_ROOT}/bin/mongos" ${mdb_downloads_dir}/mongod/bin/mongos

ln -sf "/tools/mongodump" ${mdb_downloads_dir}/mongod/bin/mongodump
ln -sf "/tools/mongorestore" ${mdb_downloads_dir}/mongod/bin/mongorestore
ln -sf "/tools/mongoexport" ${mdb_downloads_dir}/mongod/bin/mongoexport
ln -sf "/tools/mongoimport" ${mdb_downloads_dir}/mongod/bin/mongoimport
for tool in mongoimport mongodump mongorestore mongoexport; do
[ -e "/tools/${tool}" ] || { echo "/tools/${tool} not found"; exit 1; }
ln -sf "/tools/${tool}" ${mdb_downloads_dir}/mongod/bin/${tool}
done
else
echo "Mongod PID not found within the specified time."
exit 1
Expand Down