-
Notifications
You must be signed in to change notification settings - Fork 152
Commit 10d8c0a
security: run Docker container as non-root user
Running containers as a non-root user is a long standing security practice.
The changes ensure that the sourcebot user is created and has the correct
level of permissions to run all its dependencies (postgres, redis and node).
Please note that as a side effect, existing mounted volumes would need to
have their ownership reviewed or it may not be able to access the files.
This is specially the case for previous versions that would create said
files as 0:0.
To fix that, users can run chown -R 1500:1500 /path/.sourcebot. The chmod
may also need to be a bit more strict in such cases, so changing that is
advised: chown -R 0750 /path/.sourcebot.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>1 parent 83a8d30 commit 10d8c0a
2 files changed
+35
-9
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
239 | 239 |
| |
240 | 240 |
| |
241 | 241 |
| |
242 | + | ||
243 | + | ||
244 | + | ||
245 | + | ||
246 | + | ||
247 | + | ||
248 | + | ||
249 | + | ||
250 | + | ||
251 | + | ||
252 | + | ||
242 | 253 |
| |
243 | 254 |
| |
244 | 255 |
| |
| |||
247 | 258 |
| |
248 | 259 |
| |
249 | 260 |
| |
261 | + | ||
262 | + | ||
250 | 263 |
| |
251 | 264 |
| |
252 | 265 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 | - | ||
33 | + | ||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 | - | ||
39 | - | ||
40 | - | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
45 | - | ||
46 | + | ||
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
134 | 135 |
| |
135 | 136 |
| |
136 | 137 |
| |
137 | - | ||
138 | - | ||
138 | + | ||
139 | + | ||
139 | 140 |
| |
140 | 141 |
| |
142 | + | ||
143 | + | ||
144 | + | ||
145 | + | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | + | ||
141 | 150 |
| |
142 | 151 |
| |
143 | - | ||
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | ||
156 | + | ||
144 | 157 |
| |
145 | 158 |
| |
146 | 159 |
| |
| |||
159 | 172 |
| |
160 | 173 |
| |
161 | 174 |
| |
162 | - | ||
175 | + |
0 commit comments