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

Timeout chown /nexus-data #32

Closed r0bnet closed 4 years ago

r0bnet commented 4 years ago

Hey,

we're running this image in a K8s cluster. We already have >250GB data and this leads to a problem that the 2nd line in the run script (the chown of the /nexus-data) takes ages or even hangs. Then K8s thinks that the pod is not ready in time and will reschedule it.

We could increase the timeout but this is a dirty quickfix that doesn't scale.

An idea is to control the chown line via an ENV variable. So for example CHOWN_NEXUS_DATA=true could be the default and could be overridden if the chown thing is not needed.

Imho this command should only be run for initial startup and not necessarily on each startup since the files are already owned by the nexus user.

If you agree i could also add a PR for this.

cmoroianu1 commented 4 years ago

Hi,

Having the parameter to disable it is an option. We should also make it smarter, so that it does not block the start process. I'll look into it and follow up.

cmoroianu1 commented 4 years ago

issue resolved by adding the feature requested.