xaq Posted January 7 Share Posted January 7 Hi, I am trying to deploy a container from https://hub.docker.com/r/sonatype/nexus3/ which should've been fairly straight forward exposing the port that is needed and a folder for nexus to create persistent data. When the container starts it crashes because it is unable to write into the data directory, which like any other directory belongs to "users:nobody" the container tries to write into this with a user "nexus:nexus" with uid/gid "200:200" and naturally fails. I've looked into the template and did some digging around the internet and this user 200 is hardcoded in nexus way too early in the process deep down inside build stages in "chef" (some details here if you are interested: https://community.sonatype.com/t/reference-to-configuration-properties-uid-in-docker-container/7765 ) There is a NexusOSS in community applications, but it is doing the exact same behaviour and I am not certain if it ever worked at all. There is a single question in the support thread and nothing else. It looks like someone copy pasted parts of CA auto generated template and left it there. Now I can run the container in privileged mode and this "may" solve the issue, but I really don't want to do that. I have also tried creating a user in unraid from cli, called "nexus" with userid "200" and belonging to "users" group, and that did not work either (also this again probably is not a nice solution) Anyone has any similar experience with containers? what is the best approach here? @linuxserver.io you got plenty of experience in taming unruly containers, any suggestions? Quote Link to comment
BRiT Posted January 7 Share Posted January 7 Create the nexus custom user and custom group (200, 200) and change ownership of the directory to the custom user and group on the unraid side. Quote Link to comment
xaq Posted January 7 Author Share Posted January 7 I was hoping to avoid doing this, with may be some DockerFile wizardy, that I can import/modify original container and publish it on dockerhub, that does not have this uid/gid requirement. I mean there are so many other containers writing into these persistent directories. Quote Link to comment
BRiT Posted January 7 Share Posted January 7 Maybe you could ssh/exec into the docker container and change the user and group files under /etc directory so those nexus "200"s are mapped to 100 / 99 instead? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.