Upgrading Rocket.Chat in a Docker container

This blog is usually about Umbraco, C# or some other form of full stack development.

However, I also look after a Rocket.Chat instance - running in Docker on Windows Server 2016.

We noticed that the mobile app wouldn't connect, because the server version was too old.

How on earth do you update the Docker instance of Rocket.Chat without wiping everything?  Turns out the answer is quite simple.

First I would make sure you have a full backup of everything (just in case the process fails, and you need to revert)

Next, open up a PowerShell window, and cd to the directory where you originally created the docker-compose script.

Now issue these four commands:

  • docker pull rocketchat/rocket.chat:latest
  • docker-compose stop rocketchat
  • docker-compose rm rocketchat
  • docker-compose up -d rocketchat

With a bit of luck, you'll find everything has updated to the latest version - without losing data.

Take in to account that Rocket.Chat takes several seconds to start, so if you find "connection refused" or similar in your browser afterwards, just wait a minute and try again.

Comments