Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nexus repository manager docker upgrade

I am trying to upgrade a NXRM3 repository which is running on a docker container with a persistent volume attached to it. The existing docker container is a custom built image by adding couple of plugins through Dockerfile. I want to build the latest version image with those newer version plugins and run NXRM3 on the updated version, but how do i use the same volume with the new container? Can i attach the volume to the new container and does that work? Any help regarding the safest process is much appreciated. Thanks in advance.

Below is the docker-compose file for the existing version:

services:
 nexus:
   container_name: nexus
   build: .
   ports:
     - "8080:8080"
     - "8081:8081"
     - "8082:8082"
   volumes:
     - "nexus-data:/nexus-data"
   restart: unless-stopped
volumes:
 nexus-data:
like image 865
sankeerth reddy konda Avatar asked Nov 03 '25 02:11

sankeerth reddy konda


1 Answers

The volume exists independently of the container. So just create the new image and create a new container based on it with the original volume attached. To be completely on the safe side you can make a backup of the volume.

In case you keep the images in Nexus as well, be careful to have it available on the host before you bring down the old Nexus container.

like image 93
Henry Avatar answered Nov 04 '25 18:11

Henry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!