Upgrade Deprecated Mongo 4.0.28

My RocketChat is running in Docker.
I am running RocketChat v4.6.1
I am running MongoDB v4.0.28
Mongo says it is deprecated.
I have tried to upgrade to Mongo 4.2 following the Mongo upgrade instructions.
When I change the container from Mongo 4.0 to Mongo 4.2, the Mongo container just gets stuck in “restarting”.
The documentation says to:

  1. Stop Mongo
  2. Edit your mongo setting in the docker-compose
  3. Remove your Mongo container
  4. Start the Mongo container again
  5. docker exec -it mongo bash
  6. mongo
  7. db.adminCommand( { setFeatureCompatibilityVersion: “4.2” } )

That is supposed to do the upgrade.
The problem is I never get past #4 because the container gets stuck in Restarting…
Any help here please?

I tried the upgrade process step by step. The end result is that although it says that Mongo v5.0 is running, the mongo5 container is constantly in restarting mode. Has anyone moved beyond MongoDB v4.6.1?

I have a solution and created a video for it on my channel.