Fix MongoDB Signature Key Issue and Resolution #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The build process for the pymongo Docker image fails due to an expired MongoDB signature key. My guess is that the base image mongo:4.4 is using an expired key, which causes the apt-get update step to fail. This error also prevents Python 3 from being installed, which causes the overall component (ingestdata) build to fail.
Error log:
To resolve this issue, I switched the base image to ubuntu:focal, the same base image mongo:4.4 uses, and I manually:
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
Note that MongoDB 4.4 is past its end of life cycle as of February 2024. I think it is better to upgrade to a more recent version of MongoDB.
The following is a workaround for an issue with tzdata hanging during installation
These changes seem to fix the issue and the build is successful.