-
Notifications
You must be signed in to change notification settings - Fork 9
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
Permission problem with using Jammy builder #375
Comments
Additional NoteThe directory structure of the container at build time is created with
|
@hirosat Thanks for the for the perfect steps to reproduce :) For workaround: You could run the container with the build user, e.g. possible solution: It sounds to me as if a |
@c0d1ngm0nk3y Thank you for your reply!
Or it would be more appropriate if the build user could also be configured with id1002. |
@hirosat Having the whole workspace writable for the run user would somehow be against the original idea of using different users for build and run in the first place. Although, the same problem should occur when using a r/o root file system. The question is WHY Another question, you can help me with. How/when did you decide to change from |
I think the actual problem is that the runuser is not an
Usecases for react: Why:
I was decided by using |
Thanks for the explanation.
Actually i do think that the run user has the expected user id and the The permissions of these symlinks in between might be confusing. cnb@6242c05f0a37:/workspace$ id
uid=1002(cnb) gid=1000(cnb) groups=1000(cnb)
cnb@6242c05f0a37:/workspace$ ls -la node_modules
lrwxrwxrwx 1 1001 cnb 69 Jan 1 1980 node_modules -> /tmp/4d6b8328f31f0ade280f708051b532cf52e67649547d1c558ce7df2ecb94a806
cnb@6242c05f0a37:/workspace$ ls -la /tmp/4d6b8328f31f0ade280f708051b532cf52e67649547d1c558ce7df2ecb94a806
lrwxrwxrwx 1 cnb cnb 65 Oct 31 08:31 /tmp/4d6b8328f31f0ade280f708051b532cf52e67649547d1c558ce7df2ecb94a806 -> /layers/paketo-buildpacks_npm-install/launch-modules/node_modules
cnb@6242c05f0a37:/workspace$ ls -la /layers/paketo-buildpacks_npm-install/launch-modules
total 52
drwxr-xr-x 5 1001 cnb 4096 Jan 1 1980 .
drwxr-xr-x 3 1001 cnb 4096 Jan 1 1980 ..
drwxr-xr-x 2 1001 cnb 4096 Jan 1 1980 env.launch
drwxr-xr-x 2 1001 cnb 4096 Jan 1 1980 exec.d
drwxr-xr-x 854 1001 cnb 36864 Jan 1 1980 node_modules
Thanks for the explanation. Yes, I agree that this seems not to be specific to
Thanks. |
Maybe I misunderstood. |
Got it. The idea of splitting the run and build user is originated here. @paketo-buildpacks/nodejs-maintainers Having a group writable But the I guess this use case will just not work with a readonly root filesystem, but I don't see a chance. |
Now I understood the background. Thank you for your kindly explanation. |
@c0d1ngm0nk3y |
@c0d1ngm0nk3y Any updates? |
@hirosat Sorry for the VERY late reply :( I created a draft pr for the fix, I just wanna check the approach with the maintainers first before I clean the pr up. But basically, the |
Fixed with the next release of |
Expected Behavior
We can run the container without permission trouble in case using React APP (npm start for development).
As a successful example, I will show the case of using bionic based builder.
Current Behavior
Failed to run the container with permission trouble when using Jammy based builder.
I guess #278 may be related.
Possible Solution
I will probably go back to bionic based builder for a while for React development.
However, bionic is not good for a security perspective. So I hope this issue will be fixed.
Steps to Reproduce
Motivations
I think it's a very basic scenario when we develop React App.
If we can't do it, we need to go back dockerfile.
The text was updated successfully, but these errors were encountered: