1

Nexus v3.x running as a Docker container.

I setup a Ubuntu VM with 1TB disk space. However, the container seems to only use 180G (from df -h or du -sh), and has run out of space. Hence I can’t even log in. How can I set the amount of disk space the container uses?

I initially created the volume.

$ docker volume create --name nexus-data

I do this to start the container

$ docker run -d -p 8081:8081 --memory 16g --name nexus -v nexus-data:/nexus-data sonatype/nexus3

I essentially followed the steps at the bottom of Sonatype Nexus3 Docker: sonatype/nexus3. How can I let Nexus use, say 500GB of total disk space?

Chris F
  • 14,337
  • 30
  • 94
  • 192

1 Answers1

1

Finally the docker log messages lead to a help (together with some googling). I was able to resolve it by this (but in my case I have just 8GB volume):

docker run -d -p 8888:8081 --name nexus -v nexus-etc:/nexus/etc -v nexus-data:/nexus-data sonatype/nexus3
docker ps
<... get id ...>
docker exec -it -u 0 [the id] bash
find -name "karaf"
<...>
cp ./nexus/etc/karaf/system.properties ./nexus/etc/karaf/system.properties.backup20220914
sed -i 's/diskFreeSpaceLimit=4096/diskFreeSpaceLimit=2048/g' ./nexus/etc/karaf/system.properties

Also check the filesystem type, there are some properties for docker volume limits.

dmatej
  • 1,518
  • 15
  • 24