Explorar o código

docker: fix mkdir subdir in /data failed when no mount volume (#6107)

eightpigs %!s(int64=4) %!d(string=hai) anos
pai
achega
e131a45646
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      docker/start.sh

+ 3 - 0
docker/start.sh

@@ -30,6 +30,9 @@ cleanup() {
 }
 
 create_volume_subfolder() {
+    # Modify the owner of /data dir, make $USER(git) user have permission to create sub-dir in /data.
+    chown -R $USER:$USER /data
+
     # Create VOLUME subfolder
     for f in /data/gogs/data /data/gogs/conf /data/gogs/log /data/git /data/ssh; do
         if ! test -d $f; then