Skip to content

Commit

Permalink
YOU DID NOT BIND MOUNT /data TO A PERSISTENT HOST FOLDER
Browse files Browse the repository at this point in the history
  • Loading branch information
rednoah committed Jan 8, 2025
1 parent 1d700e6 commit fdc08a1
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions generic/opt/share/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,31 @@ docker run --rm -it -v data:/data -e PUID=$(id -u) -e PGID=$(id -g) rednoah/file
"


echo "
\033[38;5;214m
# env
USER=$(id -un)($(id -u))
HOME=$HOME
\033[0m
"


if [ "$(id -u)" -eq 0 ]; then
echo '
echo "
\033[38;5;196m
!!! YOU ARE RUNNING AS ROOT AND NOT AS NORMAL USER !!!
\033[0m
'
"
fi


if [ ! -d "$HOME" ] || [ "$(stat --file-system --format '%T' "$HOME")" = 'overlayfs' ]; then
echo "
\033[38;5;214m
# env
USER=$(id -un)($(id -u))
HOME=$HOME
\033[38;5;196m
!!! YOU DID NOT BIND MOUNT $HOME TO A PERSISTENT HOST FOLDER !!!
All data stored to the application data folder \`$HOME\` will be lost on container shutdown, like tears in rain.
Please add \`-v data:/data\` to your \`docker\` command lest your application data, such as license key, be lost in time.
\033[0m
"
fi

0 comments on commit fdc08a1

Please sign in to comment.