diff options
author | eightpigs <eightpigs@outlook.com> | 2020-04-15 22:32:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 22:32:47 +0800 |
commit | e131a4564680a3257a2d4795af7669e4260b33b9 (patch) | |
tree | 1fb265c5646c62f1e7a9fd3c5b200ef78d1d4166 | |
parent | 28d74a98444c372ef2882c368559c8e4784a7f6f (diff) |
docker: fix mkdir subdir in /data failed when no mount volume (#6107)
-rwxr-xr-x | docker/start.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docker/start.sh b/docker/start.sh index 3913cb2f..017a1099 100755 --- a/docker/start.sh +++ b/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 |