This repository was archived by the owner on Apr 16, 2024. It is now read-only.
Commit e638f46
committed
chore: make contribute/start_docker work on Fedora
The docker-podman wrapper created volume mounts are owned by the root
user inside the container, and the doom user wouldn't have write access.
Need to specify --user-ns=keep-id flag to map $UID from the host to $UID
from the container without using subuids: that way user inside container
can modify.
SELinux is on by default on Fedora36, thus volume mounts need to specify
the 'Z' flag to relabel the directory being mounted.
podman needs '--userns=keep-id' for permissions of mounted volumes to
work inside the container.
However docker doesn't recognize that flag (and doesn't need it, since
it is running as root).
Detect which of `docker` or `podman` is installed, and if it is podman
add the extra flag. We need to check for podman first, because 'docker'
might just be a wrapper that calls podman.
Signed-off-by: Edwin Török <edwin@etorok.net>1 parent ff1ccbd commit e638f46
1 file changed
+20
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
| |||
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | | - | |
| 97 | + | |
91 | 98 | | |
92 | | - | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | | - | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | | - | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
105 | | - | |
| 112 | + | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 122 | + | |
| 123 | + | |
0 commit comments