permissions error when building the docker image over openshift #312
Unanswered
samisalamiws
asked this question in
Q&A
Replies: 2 comments 29 replies
-
🤔 the Buildpack user already is a member of the root group. So can you provide some more details about which folders of buildpack you need write access to and why? @rarkins is that the scanner image i converted some time ago? If yes, we can exchange the details in our private VisualOn repo. |
Beta Was this translation helpful? Give feedback.
29 replies
-
@samisalamiws I've fixed a number of wrong permissions on home dir. Can you check wich folder are still wrong? Please add observations to: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @viceice
we are having some permissions errors when we're building our dockerfile based buildpack over openshift. A lot of simple commands like creating folders are not able to run.
we followed the workaround suggested on their documentation at: https://developers.redhat.com/blog/2020/10/26/adapting-docker-and-kubernetes-containers-to-run-on-red-hat-openshift-container-platform#group_ownership_and_file_permission but this made our image size increase significantly (over 10 GB).
basically we added these commands:
RUN chown -R ${USER_ID}:0 /usr/local/buildpack/tools/
RUN chown -R ${USER_ID}:0 /usr/local/bin/
RUN chown -R ${USER_ID}:0 /home/wss-scanner/
RUN chown -R ${USER_ID}:0 /tmp
This brings us to an older discussion we had regarding user/group creation.
when we ran the old dockerfile (without buildpack), we creating the group/user as follow:
RUN groupadd ${WSS_GROUP} && \
useradd --gid ${WSS_GROUP} --groups 0 --shell /bin/bash --home-dir ${WSS_USER_HOME} --create-home ${WSS_USER} && \passwd -d ${WSS_USER}
when we ran the old dockerfile over openshift, it worked ok.
but currently, we are not able to create the group/user the way we were, and we're facing permissions issues.
Is there a way to adjust the user --groups value?
Beta Was this translation helpful? Give feedback.
All reactions