Commit 6d7ebb0
committed
🔨 Fix Docker permission errors with bind mounts
Bind-mounted project dirs failed on `buildozer init` with permission
denied because container UID/GID didn't match the host.
Add a lean entrypoint that maps the container user to the host UID/GID
execs buildozer, fixing writes to `/home/user/hostcwd`.
See command used and error output:
```
docker run --volume "$(pwd)":/home/user/hostcwd kivy/buildozer init
Traceback (most recent call last):
File "/home/user/.venv/bin/buildozer", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/user/.venv/lib/python3.12/site-packages/buildozer/scripts/client.py", line 16, in main
Buildozer().run_command(sys.argv[1:])
File "/home/user/.venv/lib/python3.12/site-packages/buildozer/__init__.py", line 672, in run_command
getattr(self, cmd)(*args)
File "/home/user/.venv/lib/python3.12/site-packages/buildozer/__init__.py", line 711, in cmd_init
buildops.file_copy(join(dirname(__file__), 'default.spec'), 'buildozer.spec')
File "/home/user/.venv/lib/python3.12/site-packages/buildozer/buildops.py", line 108, in file_copy
copyfile(source, target)
File "/usr/lib/python3.12/shutil.py", line 262, in copyfile
with open(dst, 'wb') as fdst:
^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'buildozer.spec'
```1 parent fe16e3e commit 6d7ebb0
File tree
5 files changed
+53
-15
lines changed- .github/workflows
5 files changed
+53
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
78 | 76 | | |
79 | | - | |
80 | 77 | | |
81 | | - | |
| 78 | + | |
| 79 | + | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
| 83 | + | |
87 | 84 | | |
88 | | - | |
| 85 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments