Upgrading docker image 12.0.2 to latest

I am using keycloak 12.0.2 as docker image. Now I wanted to upgrade to the latest version, but I have only found migration steps with a local installed keycloak server. But how does this work with the docker image?

Can I only stop keycloak 12 and start the newest docker image? Does the docker image migrate all database schemes by itself? Can I upgrade from version 12 to 15 directly or do I have to migrate from 12 to 13 and then 14 and so on?

Sadly the documentation does not mention anything about docker images.