Hi,
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.
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
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
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.