In the CodeSnack IDE, users have the flexibility of crafting a personalized script that is initiated upon the start of the Cloud Container. This feature allows for tailoring the container environment to meet your specific requirements.
To implement this, you simply need to create a Shell script at the following location:
/home/user/.codesnack-ide/autostart.sh
To create or modify the script, please use nano console editor:
nano /home/user/.codesnack-ide/autostart.sh
This script will allow you to add any commands that you want to be executed whenever the container starts. The utilization of sudo
commands is also supported, and no password requirements need to be met.
Example: To install a specific version of Node.js, you could use the following:
# /home/user/.codesnack-ide/autostart.sh
rtx install [email protected]
Performance notice. The scripting function operates asynchronously. Therefore, when you launch the application, allow time for the script to fully execute. Be aware that running heavy or demanding operations can lead to an overload of the container, which could potentially affect the performance of the Container API and the overall app functionality.