Setting up Python on Docker Container
In the following article we're going to set up Python Interpreter and run python code on a Docker container. For this practical we've to make sure that the docker service must be running.
Docker is already installed and running
Setting Up Python
Step 1 : Launch the Docker container with centos image
docker run -it --name mypythonos centos:latest
To check the running containers,
Step 2 : Install python3 software in the docker container
yum install python3 -y
To check the version of python 3 software,
Step 3 : Write Python code in the container
- Using Python3 REPL Live Interpreter .
- Write a Python code inside a file.
From this we can see that we can easily run the Python code inside the Docker container.
***** THANK YOU FOR READING!! *****
Member of Technical Staff 2 @ NetApp
4 å¹´Good job Khushi