BogdanB
Flight Engineer Flight Engineer
Flight Engineer
  • 1,372 Views

DO180 comprehensive review question

Jump to solution

Hi

regarding the container image.  The following command is not specified in the requirements but it is present in the solution

chmod  -R 755 ${NEXUS_HOME}

If you dont include this then your container will not work on openshift even tough it will run properly on your local workstation.

Can someone tell me what I'm missing here ?

Without this command then nexus home permission mode is 700 but the container is running as a nexus user so why should  as requested so why this is happening ?

Is this something related to OpenShift or Nexus in particular ?

1 Solution

Accepted Solutions
tat
Flight Engineer Flight Engineer
Flight Engineer
  • 1,257 Views
Openshift (out of the box) does not honor the user specified in the Container-/Dockerfile but rather assigns a random user id. However the randomly assigned user is part of the root GROUP. Therefore group permission flags are needed.

Best practice:

RUN chgrp -R 0 directory && chmod -R g=u directory

USER 1001

best regards,
Alexander

View solution in original post

1 Reply
tat
Flight Engineer Flight Engineer
Flight Engineer
  • 1,258 Views
Openshift (out of the box) does not honor the user specified in the Container-/Dockerfile but rather assigns a random user id. However the randomly assigned user is part of the root GROUP. Therefore group permission flags are needed.

Best practice:

RUN chgrp -R 0 directory && chmod -R g=u directory

USER 1001

best regards,
Alexander
Join the discussion
You must log in to join this conversation.