Upgrading MM Docker Install

Server: Ubuntu Server 22.04.1

Hello All,

I have recently set up a self hosted Ubuntu server (22.04.1) and followed the docker guide in the link here… Host Mattermost on Your Own Infrastructure. All working great.

If I run sudo docker images i get the following output…

REPOSITORY                                 TAG         IMAGE ID       CREATED       SIZE
certbot/certbot                            latest      613382f742bd   13 days ago   108MB
postgres                                   13-alpine   8e750948d39a   2 weeks ago   238MB
nginx                                      alpine      c433c51bbd66   2 weeks ago   40.7MB
mattermost/mattermost-enterprise-edition   7.1         d22c7954736a   4 weeks ago   616MB

However, in System Console > Workspace Optimisation I get a message about updating to 7.7.1. I’m struggling to see how this is done with a docker install? All the info I’ve found so far seems to refer to the binary install method.

I’m not fussed about being on the latest version, I just want to make sure I understand how to update in the future before deploying this system to my workplace.

Many thanks!

inside the directory where you did install the mattermost do a docker-compose pull to pull the latest mattermost docker image.
Then do
sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml down && sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d
That should upgrade you to version 7.7.1

1 Like

Thank you for the reply. Here is my output (still on 7.1). I assume the docker repo is still on that version?

user@server-vm-mattermost:~/docker$ sudo docker-compose pull
[sudo] password for user:
Pulling postgres   ... done
Pulling mattermost ... done
user@server-vm-mattermost:~/docker$ sudo docker-compose -f docker-compose.yml -f docker-compose.nginx.yml down && sudo docker-compose -f docker-compose.yml -f docker-compose.nginx.yml up -d
Stopping nginx_mattermost    ... done
Stopping docker_mattermost_1 ... done
Stopping docker_postgres_1   ... done
Removing nginx_mattermost    ... done
Removing docker_mattermost_1 ... done
Removing docker_postgres_1   ... done
Removing network mattermost
Creating network "mattermost" with the default driver
Creating docker_postgres_1 ... done
Creating docker_mattermost_1 ... done
Creating nginx_mattermost    ... done
user@server-vm-mattermost:~/docker$ sudo docker images
REPOSITORY                                 TAG         IMAGE ID       CREATED       SIZE
certbot/certbot                            latest      613382f742bd   13 days ago   108MB
postgres                                   13-alpine   8e750948d39a   2 weeks ago   238MB
nginx                                      alpine      c433c51bbd66   2 weeks ago   40.7MB
mattermost/mattermost-enterprise-edition   7.1         d22c7954736a   4 weeks ago   616MB
user@server-vm-mattermost:~/docker$

The .env file still refers to 7.1 - does that need to be manually modified by me before doing the pull?

Hey @greatscott and welcome to the Mattermost forums!

yes, you have to change the MATTERMOST_IMAGE_TAG in the .env file and then restart everything docker-compose down && docker-compose up -d. The .env file in the repository always contains the latest ESR version which is 7.1 in this case, that’s why it’s not automatically updating to 7.7.1 when you pull it.

2 Likes

Great thanks - I’ll stick with the ESR versions for now. Do I need to do anything else for nginx and/or postgres updates, or is that all handled at the same time when modifying the MATTERMOST_IMAGE_TAG?

NGINX_IMAGE_TAG is set to alpine, so this will be updated regularly I guess, PostgreSQL is also mapped to 13-alpine which should get you minor updates automatically.

1 Like

Since the folder contains multiple yml files, do we need to specify the two ymls we are using when running a docker pull? like this:
sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml pull