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 !

--

--

--

I am engineer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Monolithic Architecture and MicroServices Architecture

Important Economy Update & Optimization

OceanDAO Round 8 is live!

Image Blur Challenge with C#

MEXC Forms a Strategic Partnership with AlterVerse

DeNet NFT Staking Launch

What I Learned at Work this Week: Python Slack API

5 Best Practices for Kubernetes Multi-Container Management

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Avadhut Shinde

Avadhut Shinde

I am engineer.

More from Medium

functools in python

A SIMPLE TAX BILL CALCULATOR

Python logging basicConfig

HackerRank: Solving Leap Years Puzzle Using Python