NOTE - Before proceeding further please make sure that you have created a backup. If not then follow Backup and Restore to create a backup.
A detailed information for upgrading to a major released version can be found here.
Once the latest released version is identified we can update the corresponding version in the docker-compose.yml file.
Once version is updated, recreate container so it can use new version.
docker-compose up -d
docker-compose logs -f