0

CI: download MongoDB tools from mongodb.org
All checks were successful
ci/push Pipeline was successful
ci/tag Pipeline was successful

This commit is contained in:
0x1def 2025-04-11 10:18:15 +03:00
parent 08cb2f2798
commit 62f73e044c
Signed by: 0x1def
GPG Key ID: 3D16932F726AB1A8

View File

@ -55,24 +55,22 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ ; \
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \ sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \ tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \
done ; \ done ; \
# Install custom MongoDB and tools # Install custom MongoDB \
COMPONENTS=( \ COMPONENT="mongodb-${MONGO_BINARIES_VERSION}-linux-${OS_ARCH}-${OS_FLAVOUR}" ; \
"mongodb-${MONGO_BINARIES_VERSION}-linux-${OS_ARCH}-${OS_FLAVOUR}" \ echo "Downloading $COMPONENT" ; \
"mongo-tools-${MONGO_TOOLS_VERSION}-linux-${OS_ARCH}" \ curl -SsLf "https://dist.flakybit.net/mongodb/${COMPONENT}.tar.gz" -O ; \
) ; \ curl -SsLf "https://dist.flakybit.net/mongodb/${COMPONENT}.tar.gz.sha256" -O ; \
for COMPONENT in "${COMPONENTS[@]}"; do \ sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
if [ ! -f "${COMPONENT}.tar.gz" ]; then \ tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami/mongodb/bin --no-same-owner ; \
echo "Downloading $COMPONENT" ; \ # Install MongoDB tools
curl -SsLf "https://dist.flakybit.net/mongodb/${COMPONENT}.tar.gz" -O ; \ COMPONENT="mongodb-database-tools-debian12-x86_64-${MONGO_TOOLS_VERSION}" ; \
curl -SsLf "https://dist.flakybit.net/mongodb/${COMPONENT}.tar.gz.sha256" -O ; \ echo "Downloading $COMPONENT" ; \
fi ; \ curl -SsLf "https://fastdl.mongodb.org/tools/db/${COMPONENT}.tgz" -O ; \
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \ tar -zxf "$COMPONENT.tgz" -C /opt/bitnami/mongodb/bin --no-same-owner --strip-components=2 ${COMPONENT}/bin ; \
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami/mongodb/bin --no-same-owner ; \
done ; \
# Install rust-ping # Install rust-ping
COMPONENT='mongodb-rust-ping-x86_64-unknown-linux-gnu' ; \ COMPONENT='mongodb-rust-ping-x86_64-unknown-linux-gnu' ; \
echo "Downloading $COMPONENT" ; \ echo "Downloading $COMPONENT" ; \
curl -SsLf "https://github.com/syndikat7/mongodb-rust-ping/releases/download/v${MONGO_RUST_PING_VERSION}/$COMPONENT.tar.gz" -O ; \ curl -SsLf "https://github.com/syndikat7/mongodb-rust-ping/releases/download/v${MONGO_RUST_PING_VERSION}/${COMPONENT}.tar.gz" -O ; \
tar -zxf "$COMPONENT.tar.gz" -C /usr/bin --no-same-owner ; \ tar -zxf "$COMPONENT.tar.gz" -C /usr/bin --no-same-owner ; \
# Remove unused packages and clean cache # Remove unused packages and clean cache
apt-get autoremove --purge -y curl && \ apt-get autoremove --purge -y curl && \