mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-02 07:18:01 +02:00
Enhance registry docker file to make it work with NFS server (#4466)
This commit is contained in:
parent
2095fb0c0a
commit
0b5e0aa041
@ -9,8 +9,14 @@ if [ -d /var/lib/registry ]; then
|
|||||||
chown 10000:10000 -R /var/lib/registry
|
chown 10000:10000 -R /var/lib/registry
|
||||||
fi
|
fi
|
||||||
if [ -d /storage ]; then
|
if [ -d /storage ]; then
|
||||||
|
if ! stat -c '%u:%g' /storage | grep -q '10000:10000' ; then
|
||||||
|
# 10000 is the id of harbor user/group.
|
||||||
|
# Usually NFS Server does not allow changing owner of the export directory,
|
||||||
|
# so need to skip this step and requires NFS Server admin to set its owner to 10000.
|
||||||
chown 10000:10000 -R /storage
|
chown 10000:10000 -R /storage
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
*.yaml|*.yml) set -- registry serve "$@" ;;
|
*.yaml|*.yml) set -- registry serve "$@" ;;
|
||||||
serve|garbage-collect|help|-*) set -- registry "$@" ;;
|
serve|garbage-collect|help|-*) set -- registry "$@" ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user