Setting up Python Interpreter and running Python Code on Docker Container

Setting up Python Interpreter and running Python Code on Docker Container

Previously I showed you how to install and launch docker in RHEL8. You can visit this article to get more details: https://bit.ly/3cnIKBL

Now,

Step1 : Let us now launch container using image centos:7 and name it python

No alt text provided for this image

Step2: Install python inside docker container

Command: yum install python3

No alt text provided for this image

Step 3: Now, To run the interpreter write python3 and press enter.

Step 4: Now you can run here python commands as shown below in the figure.

No alt text provided for this image
Just 4 Steps and your Setup is ready :)
Now you can easily run your Python Code on Docker Container !

To view or add a comment, sign in

More articles by Hasti Vora

Explore content categories