mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-08-01 01:34:37 +02:00
fix: updater resolves project_root to / in Docker containers
In Docker, main.py lives at /app/main.py so Path.parent.parent resolves to filesystem root /, causing PermissionError on .github and other dirs. Now detects this case and falls back to cwd. Also grants backenduser write access to /app for auto-update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Former-commit-id: 12c8bb5816a70161d5ab5d79f9240e7eab6e6e15
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b99a5e5d66
commit
95474c3ac5
+3
-1
@@ -23,8 +23,10 @@ RUN npm ci --omit=dev
|
||||
COPY . .
|
||||
|
||||
# Create a non-root user for security
|
||||
# Grant write access to /app so the auto-updater can extract files
|
||||
RUN adduser --system --uid 1001 backenduser \
|
||||
&& chown -R backenduser /app
|
||||
&& chown -R backenduser /app \
|
||||
&& chmod -R u+w /app
|
||||
|
||||
# Switch to the non-root user
|
||||
USER backenduser
|
||||
|
||||
Reference in New Issue
Block a user