Setting up Python Interpreter and running Python Code on Docker Container

--

Prerequisite:

  • Docker Installed

Step 1) Create a docker file

  • Install python and some basic tools.
FROM centos
RUN dnf install python36 -y
RUN dnf install net-tools vim which -y
  • Build Dockerfile
docker build -t IMAGE_NAME .

Step-2) Run above the docker container.

docker run -it --name NAME_OF_CONTAINER IMAGE_NAME

Output

  • Write the python code
  • Running the python code

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

--

--

Shobhit Singh Pal
Shobhit Singh Pal

No responses yet

Write a response