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 !