Step 1: Download all the original AMD64 tar.gz packages from Stacksmith repository of Bitnami. URL is in Appendix A
Step 2: Download ARM64 binaries that correspond to above AMD64 packages
Please note the package ‘mongoexport’ and the package ‘mongodb-exporter’ are two different utilities. The mongodb-exporter is from ‘percona’ and the other is from ‘mongodb database tools’.
- Build ARM64 binaries from source for the below packages (Check for exact file name before replacing with amd64 equivalent binary)
Step 3: Build ARM64 binaries from source for the below packages (Check for exact file name before replacing with amd64 equivalent binary)
Step 4:
- Extract the AMD64 packages that were downloaded in Step 1, and then one by one copy/replace only the amd64 binary with the arm64 binary (downloaded/built in Step 2) keeping the folder structure of above packages intact.
- For example, the folder structure of MongoDB shell AMD64 package is as below,
- Inside the bin folder, delete AMD64 binary ‘mongosh’ and copy ARM64 binary ‘mongosh’ in its place. No other folder structure changes or files need to be modified.
- Once the ARM64 binary is copied, then rename the folder name part of ‘amd64’ with ‘arm64’ and finally compress the folder again into tar.gz format
Step 5:
Repeat the above Steps 4 until:
- All AMD64 packages have been extracted.
- All corresponding ARM64 binaries copied to ‘bin’ folders and,
- All folders containing ARM64 binaries are re-named and re-compressed again into tar.gz packages
Step 6:
- Copy/Move the packages to a static location like S3 bucket in AWS or other repository as per availability. Please check the example image below.
- Provide appropriate access to the files so that docker can fetch these during build process