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

pull/6119/head
eightpigs 2020-04-15 22:32:47 +08:00 committed by GitHub
parent 28d74a9844
commit e131a45646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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