# Migrating to 3.71 on a docker-based installation

**URL:** <https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045>\
**Category:** Sonatype Nexus Repository\
**Tags:** help, docker, nexus-repository, upgrade\
**Created:** [August 13, 2024, 3:52pm UTC](https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045 "2024-08-13T15:52:52Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mbender](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/mbender/32/3577_2.png) [@mbender](https://community.sonatype.com/u/mbender)\
**Post date:** [August 15, 2024, 8:16am UTC](https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045/7 "2024-08-15T08:16:49Z")

</div>

From what I can tell the `3.71.0` tag is the same as `3.71.0-java17-ubi` and `3.71.0-ubi` (see: [https://hub.docker.com/r/sonatype/nexus3/tags?page=&page\_size=&ordering=&name=3.71](https://hub.docker.com/r/sonatype/nexus3/tags?page=&page_size=&ordering=&name=3.71) and compare the digest codes).

That said you are correct - after this whole ordeal I’m also getting `Duplicate key` errors. ☹

Quick googling found this thread: [Cannot upload after OrientDB to H2 migration: Unique index or primary key violation · Issue #449 · sonatype/nexus-public · GitHub](https://github.com/sonatype/nexus-public/issues/449)  
[There seems to be a script there which solves the issue](https://github.com/sonatype/nexus-public/issues/449#issuecomment-2285844522). I’m going to give it a go after breakfast. 😉 Also worth noting that the script author has also provided instructions a few responses further on how to execute this in a docker-based instance.

**EDIT: The script from Github appears to work and seems to have fixed the issue.**

Instructions for running the script when dealing with a dockerized Nexus:

1. copy the script to an `.sh` file
2. modify the script as needed to point to the docker-based location for `NEXUS_DATA` and the following `NEXUS_BIN`:

```auto
NEXUS_BIN=/opt/sonatype/nexus/
NEXUS_DATA=/nexus-data/db

```

1. bind/mount the created `.sh` file to your Nexus container and run it by overriding the `entrypoint` parameter
2. if all went well then remove the overridden `entrypoint` and remove the script bind to cleanup
3. restart your Nexus container as normal

---

_[View the full topic](https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045)._
