Python & DockeršŸ‹

Avadhut Shinde
3 min readMar 14, 2021

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 !

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response