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

Issue with non-root user in container #56

Open
JanJamaszyk-FlyNow opened this issue Jul 2, 2020 · 1 comment
Open

Issue with non-root user in container #56

JanJamaszyk-FlyNow opened this issue Jul 2, 2020 · 1 comment

Comments

@JanJamaszyk-FlyNow
Copy link

Hello,

since I switched my base-image to a non-root user, the bazel installation inside the container exits with:
FATAL: Output base directory '/home/jan/.cache/bazel/_bazel_jan' must be readable and writable.
Permissions for the directory are:
drwxrwxr-x 6 jan jan 4096 Jul 2 16:47 _bazel_jan
The UID inside and outside of the container are also matching. Is there any way to make dazel work with a non-root user inside the container?
Thanks,
Jan

@wojciechmadry
Copy link

I had the same problem, so I checked the permissions in the docker dazel container.
It looks like all the folders above the project belong to the root (the .cache folder in your example), while the files in the project belong to the user from the docker container.

My solution (more of a workaround):

  1. Create a .cache folder in your project folder
  2. Export the variable export DAZEL_BAZEL_USER_OUTPUT_ROOT=PATH_TO_CACHE_FOLDER_IN_YOUR_PROJECT
  3. Run dazel

wojciechmadry added a commit to wojciechmadry/skip_list that referenced this issue Apr 12, 2024
wojciechmadry added a commit to wojciechmadry/skip_list that referenced this issue Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants