Migrate to postgres 17

I am using a docker compose that specifically uses postgres:16, I notice your recommended docker compose suggests postgres:latest, but when I try to set latest I get a lot of errors and seems like I need to do a migration to go from 16 to 17.

Is there a good post about how to go about doing this properly?