Upgrade Nexus 3.6x.y to latest using docker-compose

I could use some help here. I am upgrading a docker container for the first time and the nexus repo happens to be the first one. My goal is to upgrade from 3.60.0 to the latest image. I have copied my docker-compose file here.

version: "3.9"
    # image: sonatype/nexus3:3.60.0
    image: sonatype/nexus3:latest
    container_name: nexus
      - 8081:8081
    restart: always
      - "/data/nexus/:/nexus-data"
      - nexus-vol:/opt/sonatype

Now, the nexus container is already running with the 3.60.0 version. After changing the docker image to the latest as above. I executed the two commands below.
$ docker-compose pull nexus
$ docker-compose up -d

Though, the docker-compose shows it is using the latest image but the webpage is still showing the 3.60.0

$ docker-compose images nexus
nexus sonatype/nexus3 latest bda195cc2883 572MB

What else I should do to do a proper upgrade?

Thank you in advance,

Sometimes the version number is cached by web browsers. Have you tried clearing your browser’s cache?

Did not help. I have also used a completely different browser.

I have removed the unused images by below command so the nexus:3.60.0 is removed.
$ docker image prune

I have brought up another new nexus repo on a different port (9999) with latest image and the web page shows (obviously) a new version (3.64)
$ docker run -d --name=nexusnew -p 9999:8081 sonatype/nexus3:latest

I made sure that the new and old containers used the latest image but the old container is still showing version 3.60

$ docker inspect nexus | grep Image
“Image”: “sha256:bda195cc2883a7a3297be87771e3bd09e8e1a0e1b8f113dae864cb013072eac2”,
“Image”: “sonatype/nexus3:latest”,

$ docker inspect nexusnew | grep Image
“Image”: “sha256:bda195cc2883a7a3297be87771e3bd09e8e1a0e1b8f113dae864cb013072eac2”,
“Image”: “sonatype/nexus3:latest”,

$ curl --include --silent http://localhost:8081/ | grep Server
Server: Nexus/3.60.0-02 (OSS)

$ curl --include --silent http://localhost:9999/ | grep Server
Server: Nexus/3.64.0-04 (OSS)

The only difference is the old container (3.60.0) is using the persistent volumes. I assume the data in the persistent volumes have to be updated/upgraded, which I don’t know how to do.

I had to avoid using persistent volume for the whole /opt/sonatype instead of that, I should only map volumes for /opt/sonatype/etc/jetty and /opt/sonatype/etc/ssl. So, the jar files directories are overwritten by the new image and the new Nexus OSS version appears on the web interface.