MongoDB:4.2 docker image failing to apt-get update due to expired signature

You can use the following command to fix the issue for the Invalid signature. Place it before apt-update command:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 4B7C549A058F8B6B

It solved the problem for me. Had the same issue.

2 Likes