Upgrade MongoDb docker container to 5.0.2


I am running a MongoDB replicaset as docker containers.
I would like to upgrade my mongoDB replicaset containers from v4.2.3 to 5.0.2.

Can it be done in-place?
If so - how?

If it cannot, then the only option is to create a new replicaSet with MongoDB 5.0.2, and mongorestore to it?


Its exactly the same as non-docker. Instead of replacing binaries you’re updating your container image.

1 Like

Thanks @Chris Dellaway

I will certainly try this.