Configuring Python Interpreter on the top of Docker.

Nishant Bhosale
3 min readDec 31, 2020

--

Docker

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. It is founded by Solomon Hykes at DockerCon. Solomon Hykes built a wonky open-source project a decade ago that later took on the name Docker and attained a private market valuation of over $1 billion.

Python

Python is an interpreted, high-level, and general-purpose programming language. Python’s design philosophy emphasizes code readability with its notable use of significant whitespace.

Steps for configuring the python interpreter on top of docker:

Step 1:

At first, we need to download the os image from the docker hub. In my case I am downloading centos version 8.

the command to download:- docker pull os_image:version

Step 2:

Now we already downloaded the os image, for checking the images downloaded we have the docker images command.

Step 3:

To run the docker container we have a command:

docker run -it — name name_of_container os_name:version

Step 4:

Our main purpose is to download and configure the python interpreter. So we have to check which software provides the python software. We have a command which shows which software provides the python.

the command to see: yum whatprovides python3

Here we get the name of the software name of the python3. The software name is python36.

Step 5:

Here we install the python with python36 software.

command: yum install python36

Step 6:

To see Python is properly installed we can see it by python3 -V command. Here we see the version of python.

Step 7:

Python interpreter is properly installed so we create the directory for python code.

Step 8:

Now we create the code in python. Here is the code I have written in python.

Step 9:

Here is the python code that I have written.

Step 10

Here we run the code.

command: python3 name.py

Conclusion

Here we see the integration of docker and python. We used the yum command to install python. And we write and run the python code in docker.

--

--

Nishant Bhosale
Nishant Bhosale

No responses yet