Upgrading MongoDB in Docker Desktop Windows 10

Description

Receiving notice that MongoDB version 5.0.24 is depreciated with RocketChat v7.0.0.

There is no documentation I can find that shows how to upgrade Mongo in this instance. Rocket Chat links to Mongo documentation that is no help.

Server Setup Information

  • Version of Rocket.Chat Server: 7.0.0
  • Operating System: Windows 10 Pro
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 20.17.0
  • MongoDB Version: 5.0.24
  • Proxy:
  • Firewalls involved:

It’s a generic thing and not specifically Rocket.Chat

A brief search on the interwebs (I just did this myself) will tell you how to upgrade Mongo in a docker container.

eg.

So back up the container, create a new container with the updated version and import the data.

Whatever you do, backup first.

And search here for mongo upgrade finds this:

Thank you for the reply reteep, I did in fact already trying searching for this myself. All of the documentation seems to assume you already know a lot about this. I do not. With that in mind, the lack of clear step by step processes is frustrating, and annoying. Just saying enter x command to do y is not helpful. I tried starting with the guide you have linked to, first thing to enter was “db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )”

I did that in the docker terminal, and it just errored saying no such command exists. Like I said there is a huge amount of assumed knowledge in these guides. Which makes them bad guides.

I had no issues setting up RC since the guides provided by RC were top notch, and easy to follow.

And to be honest if RocketChat relies on MongoDB, and is going to kick out notices of it being depreciated, I view that as a RocketChat issue.

I do not see why a clear guide from RocketChat, like the existing ones for setting up, and upgrading the RC server does not exist for a key dependency such as MongoDB.

Well, for starters you aren’t even using a supported installation. If you really don’t want to learn to administrate then use snaps, or pay for support.


Deploy on Windows 10
This is a community-supported installation method. To learn more, see this


You have to accept you are a server administrator of an unsupported install method (both via docker or native using WSL2) and need to do some lifting yourself.

Because Rocket use Mongo, but it isn’t their responsibility.

There are various different ways to install and use Mongo, and lots of differences on upgrades. There is no ‘one size fits all’ and there are differences between Mongo versions which need to be accounted for - you may be using one Mongo server or multiple, dockerised, local, remote, extra settings as you may have more than one DB in Mongo, all of which need to be handled differently.

Rocket aren’t responsible for that. The information they give is for guidance but like anything in software, ultimately the responsibility lies with the admin.

Personally I used a dockerised Rocket and a local Mongo. After having considered the alternatives when I first installed, I chose that install type for the express reason that updates are a breeze.

Mongo docker upgrades are less so and there is no simple route. However there are a plethora of online docs out there on doing it so I guess they figure it isn’t worth reinventing the wheel.

If the Mongo upgrade docs are not clear, speak to Mongo… but also realise it is inside docker which complicates it. You need to understand both.

I’m not sure what is helpful to you then? I suppose you want a button to click to do it all for you?

This is not Windows world. It isn’t all point and click dumbed down stuff - barring snaps. Sorry.

You probably should do some more reading before using a command you don’t understand. That command is meant to be run from INSIDE the container.

You can read elsewhere how to enter a container to execute Mongo commands.

Look for docker exec -it blah

What it actually it means is you have very little knowledge and have got to go right back to the start and learn rather than trying to jump in halfway. The guides are not meant to be used that way. Again, that is an issue you can take up with the Mongo and/or docker teams


Before you go any further have you even run a backup yet? That should be the very first thing before you start breaking stuff. In fact, have you ever run backup of the DB as what you have said so far leads me to believe you probably haven’t. And no, don’t trust Windows backups - you should have a direct one from the docker Mongo DB using mongodump.

You should also look at this script (in the link I sent above) that will do most it for you, with some modification. It also tells you it is no simple task.

I’d also help yourself by reading this. It has some handy tips on how to ask for help.