Python & Dockerš

What is Python? Why Python?
šš»āāļøPython is a popular programming language. It was created byĀ Guido van Rossum, and released inĀ 1991. ItāsĀ latest versionĀ isĀ Python 3.7
Task Descriptionš
Setting up Python Interpreter and running python code on docker container.
Letās move towards practical part..
Firstly before running docker services i will disable firewall security of base o.s usingĀ #systemctl stop firewalldĀ & change mode of SELINUX .Here #setenforce 0Ā is a command which changes SELINUX fromĀ targeted to Permissive Mode. In this mode, we can perform all actions without any security issues.

Now we willĀ check our docker images

We can use #docker ps -a here in above image we can see my all last exited o.s , now here i got my previously used container unique id & name.
So by usingĀ #docker start os-idĀ here i started my previous o.s simultaneously i also wentĀ inside o.sĀ usingĀ #docker attach os-id.
Hence,we can say docker providesĀ permanentĀ storage of all our files,dataĀ etc.Until we manually terminate it.
Now itās timeĀ to set-up python interpreter so we need to install itĀ by using command :Ā #yum install python3

Letās nowĀ run python interpreter

HereĀ #python3Ā is the command which helps the user to enter into a python interpreter.
Now we will make a python file usingĀ #vi gc.py

Then to run this code we will useĀ #python3 filename.py

Finally, our Task_7.2_B i.e Setting up Python Interpreter and running python code on docker container is accomplished !
Thank you !