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"
services:
nexus:
# image: sonatype/nexus3:3.60.0
image: sonatype/nexus3:latest
container_name: nexus
ports:
- 8081:8081
restart: always
volumes:
- "/data/nexus/:/nexus-data"
- nexus-vol:/opt/sonatype
volumes:
nexus-vol:
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
CONTAINER REPOSITORY TAG IMAGE ID SIZE
nexus sonatype/nexus3 latest bda195cc2883 572MB
$ docker inspect nexus | grep Image
“Image”: “sha256:bda195cc2883a7a3297be87771e3bd09e8e1a0e1b8f113dae864cb013072eac2”,
“Image”: “sonatype/nexus3:latest”
$ curl --include --silent http://localhost:8081/ | grep Server
Server: Nexus/3.60.0-02 (OSS)
I am 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 don't find any documentation for docker particularly.
Can anyone help me, please?