travelaudience / docker-nexus

A container image for Sonatype Nexus Repository Manager OSS, based on Alpine Linux.
Apache License 2.0
43 stars 43 forks source link

faster selective chown #23

Closed cmoroianu1 closed 5 years ago

cmoroianu1 commented 5 years ago

on lage repos chown takes long time (15+ min on a 400gb repo); Usually the pod is started with the same volume that was used before, so doing chown on all files is redundant;

This change will only change the owner on files that need that. Speed gains on the same repo are significant, to run the find and check all files takes 10s.

jansmets commented 5 years ago

Why does the chown even need to happen? Can't you assume that, after starting once, that the permissions are OK? (I have ~2TB of data)

cmoroianu1 commented 5 years ago

Fair, but will that mean that you need to manually do the chown the first time? This is making sure the files are with correct permissions regardless if it is first time run or the pod just restarted. I think the chown is needed.