mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-06-24 02:01:03 -04:00
0ff1923d3e
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