Latest version on dockerhub: sonatype/nexus3
Based on advice Nexus migration for OrientDB to H2 for 3.70.1-02 fails as nexus-db-migrator is version 3.70.1-03 #451:
Admin - Export databases for backup
backup
/nexus-data/backup
docker compose stop
services: nexus3: image: sonatype/nexus3:3.70.2 container_name: nexus3 command: "sleep 3600"
docker compose up -d
docker-compose exec nexus3 /bin/bash
cd /nexus-data/backup
nexus-data/backup
. Mine was created under subfolder name /
(slash) ???. So I moved it to correct location.java -Xmx2G -Xms2G -XX:+UseG1GC -XX:MaxDirectMemorySize=28672M -jar nexus-db-migrator-3.70.1-03.jar –migration_type=h2
cp nexus.mv.db /nexus-data/db
vi /nexus-data/etc/nexus.properties
and add/change: nexus.datastore.enabled=true
and save.docker compose stop
command
from docker-compose.yml
docker compose up -d
docker compose logs | grep H2
Gitlab Runner cannot get docker image:
ERROR: Preparation failed: failed to pull image “…” with specified policies [always]: unknown blob (manager.go:205:3s)
In nexus log, lot of: org.sonatype.nexus.repository.docker.internal.V2Exception: authentication required
In host dockerd log:
Jul 19 06:53:49 lxc809 dockerd[303]: time="2021-07-19T06:53:49.863528790Z" level=error msg="Download failed after 1 attempts: unknown blob" Jul 19 06:53:49 lxc809 dockerd[303]: time="2021-07-19T06:53:49.863896588Z" level=error msg="Download failed after 1 attempts: unknown blob" Jul 19 06:53:50 lxc809 dockerd[303]: time="2021-07-19T06:53:50.724398387Z" level=error msg="Download failed after 1 attempts: unknown blob" Jul 19 06:53:50 lxc809 dockerd[303]: time="2021-07-19T06:53:50.724503196Z" level=info msg="Attempting next endpoint for pull after error: unknown blob"
Reason: Due to bug Docker - Delete unused manifests and images task may delete referenced layers if the database query to select components encounters limits, docker blobs were removed.
Solution: redeploy image again.