inception-42
inception-42 copied to clipboard
Your .../wordpress/tools/script.sh shell file deleted all my files inside my docker machine
At script.sh, when you're doing
mkdir /var/www/
mkdir /var/www/html
cd /var/www/html
rm -rf *
the rm -rf * part literally deleted all my files.
That's happened while the program was running mkdir /var/www/ and mkdir /var/www/html commands. And then I noticed that I am out of memeory and failed to create the folders and that caused cd /var/www/html to fail.
Then when we get to rm -rf * command, as you see it's literally deleting all files on / (root) directory in that case.
For fixing that, just please add certain directory to rm command, this is really not safe.
rm -rf /var/www/html/*