How can I create a safe testing environment for my shell scripts?

0
1
Asked By QuirkyPanda74 On

I'm looking for ways to set up an isolated environment to test my shell scripts. I need to ensure they can run without failing if certain non-standard commands are missing (like `qemu-system-*`). While I initially thought of using tools like `schroot`, `docker`, or `lxd`, I'm also considering modifying environment variables, such as `PATH`, to mimic the absence of these commands. However, protecting my file system during testing is crucial since I want to avoid any accidental commands like `sudo rm -rf --no-preserve-root /`. What do you all think?

1 Answer

Answered By ChillGiraffe88 On

Have you thought about using containers? They're great for isolating your environment without the overhead of creating a full virtual machine.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.