sonatype / docker-nexus

Docker image for Sonatype Nexus
Other
383 stars 201 forks source link

[nexus2] - /var/lib/rpm/.dbenv.lock -> needs root #63

Open ReSearchITEng opened 6 years ago

ReSearchITEng commented 6 years ago

anonymous org.sonatype.nexus.yum.internal.task.CommandLineExecutor - Execute command : mergerepo --no-database --repo=file:[....] [...] anonymous org.sonatype.nexus.yum.internal.task.CommandLineExecutor - ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock'

Conclusion is that for nexus2 (which uses OS's RPM commands), the process needs to run as root (and not as nexus user).

For those facing this issue, the work around is to start the nexus2 overriding the user defined in Dockerfile using: docker run -u root ...