File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,15 @@ if [ "$(id -u)" = "0" ]; then
5858 ln -sf /accelerated-computing-hub/brev/ipython-startup-add-cwd-to-path.py " ${HOME} /.ipython/profile_default/startup/00-add-cwd-to-path.py"
5959 fi
6060
61- # Setup Git safe directory
62- git config --global --add safe.directory " /accelerated-computing-hub " 2> /dev/null || true
61+ # Fix ownership of home directory contents (we created them as root)
62+ chown -R " ${TARGET_USER} : $( id -gn ${TARGET_USER} ) " " ${HOME} "
6363
64- # Ensure logs directory exists and is writable
65- mkdir -p /accelerated-computing-hub/logs 2> /dev/null || true
64+ # Setup Git safe directory (run as target user)
65+ gosu " ${TARGET_USER} " git config --global --add safe.directory " /accelerated-computing-hub" 2> /dev/null || true
66+
67+ # Ensure logs directory exists and is writable by the user
68+ mkdir -p /accelerated-computing-hub/logs
69+ chown " ${TARGET_USER} :$( id -gn ${TARGET_USER} ) " /accelerated-computing-hub/logs
6670fi
6771
6872# Dispatch to service-specific entrypoint
You can’t perform that action at this time.
0 commit comments