Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding root to docker run #1693

Merged
merged 2 commits into from
Dec 14, 2022
Merged

Adding root to docker run #1693

merged 2 commits into from
Dec 14, 2022

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Dec 14, 2022

Because in https://github.com/pyansys/mapdl-docker-image-builder/pull/30 the root stopped to be the default user.

We need the root to operate at /jobs. Otherwise the CICD shows:

Digest: sha256:3082a8d05bc4c0cd0e4a7e978be14c86f7cafd381ff0b556d097285a5db147a0
Status: Downloaded newer image for ghcr.io/pyansys/mapdl:v22.2-ubuntu
ghcr.io/pyansys/mapdl:v22.2-ubuntu
mkdir: cannot create directory '/jobs': Permission denied
Error: Process completed with exit code 1.

Also when using the docker image as a container for running the test locally we see the following error in the checkout action:

Run actions/checkout@v3
/usr/bin/docker exec  76ecd63f3a8f7a867b0adef45933ee0e317478b8c8b47cf18b0a8dcbec98db83 sh -c "cat /etc/*release | grep ^ID"
##[debug]ID=ubuntu
##[debug]ID_LIKE=debian
##[debug]Running JavaScript Action with default external tool: node16
node:internal/fs/utils:344
    throw err;
    ^

Error: EACCES: permission denied, open '/__w/_temp/_runner_file_commands/save_state_07907405-b62e-4cec-86f4-a6f9bb258ed2'
    at Object.openSync (node:fs:585:3)
    at Object.writeFileSync (node:fs:21[53](https://github.com/pyansys/pymapdl/actions/runs/3694418976/jobs/6255654262#step:3:54):35)
    at Object.appendFileSync (node:fs:2215:6)
    at Object.issueFileCommand (/__w/_actions/actions/checkout/v3/dist/index.js:2344:8)
    at Object.saveState (/__w/_actions/actions/checkout/v3/dist/index.js:11928:31)
    at Object.153 (/__w/_actions/actions/checkout/v3/dist/index.js:4095:10)
    at __webpack_require__ (/__w/_actions/actions/checkout/v3/dist/index.js:22:30)
    at Object.287 (/__w/_actions/actions/checkout/v3/dist/index.js:7064:34)
    at __webpack_require__ (/__w/_actions/actions/checkout/v3/dist/index.js:22:30)
    at Object.853 (/__w/_actions/actions/checkout/v3/dist/index.js:31838:36) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/__w/_temp/_runner_file_commands/save_state_07907405-b62e-4cec-86f4-a6f9bb2[58](https://github.com/pyansys/pymapdl/actions/runs/3694418976/jobs/6255654262#step:3:59)ed2'
}
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Install Git and checkout project

@germa89 germa89 self-assigned this Dec 14, 2022
@germa89 germa89 added the CI/CD Related with CICD, Github Actions, etc label Dec 14, 2022
@germa89 germa89 requested a review from greschd December 14, 2022 11:36
@github-actions github-actions bot added the BUG Issue, problem or error in PyMAPDL label Dec 14, 2022
@github-actions
Copy link
Contributor

Please add one of the following labels to add this contribution to the Release Notes 👇

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Merging #1693 (09e192b) into main (a0471db) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1693      +/-   ##
==========================================
+ Coverage   85.20%   85.23%   +0.02%     
==========================================
  Files          45       45              
  Lines        7511     7511              
==========================================
+ Hits         6400     6402       +2     
+ Misses       1111     1109       -2     

@germa89
Copy link
Collaborator Author

germa89 commented Dec 14, 2022

Looking forward to get some feedback from @greschd about the root stuff. I would like to avoid to use -u=0:0 if possible so we only execute certain commands as root, not the whole workflow.

@germa89 germa89 merged commit 70c6b3b into main Dec 14, 2022
@germa89 germa89 deleted the fix/user-non-root-in-cicd branch December 14, 2022 12:45
@germa89
Copy link
Collaborator Author

germa89 commented Dec 14, 2022

Merging from now, because I need to keep working on other PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Issue, problem or error in PyMAPDL CI/CD Related with CICD, Github Actions, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant