Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Missing write permissions when running job in Docker Container

p_cherk August 31, 2023

I have tried to run E2E tests job in a Docker container, but I was not able to install project dependencies because of missing write permissions. I was using Cypress image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1 on a Atlassian Bamboo version 9.2.4 build 90203 - 26 Jul 23


It turned out that all files in the directory are assigned to "nobody nogroup".
I tried the solutions from the article docker runner fails with permission denied:
- "Run container in a privileged mode" throws: "docker: Error response from daemon: privileged mode is incompatible with user namespaces. You must run the container in the host namespace when running privileged mode."
-- Adding user namespace in the extra arguments for docker run results in: "unknown flag: --userns host --privileged"
-"Manually add a label to host directory" - throws: "chcon: cannot access '/home/bamboo/bamboo-agent-home/xml-data': No such file or directory"
-"Add :z suffix to volume mount binding" - nothing changed

I have tried also changing the current user as shown in
docker task permission denied, but I was not able to use or install sudo. Adding "apt-get update && apt-get -y install sudo" in the extra arguments for docker run command results in "invalid reference format". At the same time when bamboo checks out the code from the repo, it changes the write permissions and the user to root, but not when there is a script or a npm task.

Is this something connected with the image I have used? How should I fix the write permissions for this job?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events