What is the Matomo Upgrade process deployed in docker

What is the process of upgrading a dockerized matomo?
Does matomo require persistent volume and what happens if I don’t have a persistent volume? Can it be stateless?