Given a directory that contains:
We can create a
runme.sh file to always make sure we are running
Create a shell script
Create a file called
runme.sh and put the following code in:
Now instead of running
python app.py or
python3 app.py, you can simply run
Why is this useful?
This is very useful when distributing applications onto servers where the environment is not containerised.
You can also get the python version:
Or by calling the version argument:
For tips on how to containerise an application, take a look at The Docker Quickstart Guide for Developers.