mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-06-24 14:01:00 -04:00
🐛 Fix git fatal error reading /root/.git at gitea startup 🐛
Docker's WORKDIR is /root and the git user has no read permission on that directory. When gitea starts via gosu git, git inherits /root as the working directory, calls getcwd(), constructs /root/.git, and fails with "fatal: error reading '/root/.git'" — crashing gitea. Setting WORK_DIR=/data/gitea causes the init functions library to cd to /data/gitea before launching the service, so git never sees /root. - rootfs/usr/local/etc/docker/init.d/08-gitea.sh: set WORK_DIR=/data/gitea rootfs/usr/local/etc/docker/init.d/08-gitea.sh
This commit is contained in:
@@ -145,7 +145,7 @@ RUN_DIR="/run/gitea"
|
||||
LOG_DIR="/data/logs/gitea"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set the working dir
|
||||
WORK_DIR=""
|
||||
WORK_DIR="/data/gitea"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# port which service is listening on
|
||||
SERVICE_PORT="80"
|
||||
|
||||
Reference in New Issue
Block a user