aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreightpigs <eightpigs@outlook.com>2020-04-15 22:32:47 +0800
committerGitHub <noreply@github.com>2020-04-15 22:32:47 +0800
commite131a4564680a3257a2d4795af7669e4260b33b9 (patch)
tree1fb265c5646c62f1e7a9fd3c5b200ef78d1d4166
parent28d74a98444c372ef2882c368559c8e4784a7f6f (diff)
docker: fix mkdir subdir in /data failed when no mount volume (#6107)
-rwxr-xr-xdocker/start.sh3
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