Building Python Image with Docker
Published in
2 min readOct 29, 2023
1) Clonning Github source
We clone the source by using “git clone” command with the source website
2) Initialize the project
We use “docker init” command to initialize the project. Answer the questions like:
a) What application platform does your project use? Python
b) What version of Python do you want to use? 3.11.4
c) What port do you want your app to listen on? 5000
d) What is the command to run your app? python3 -m flask run — host=0.0.0.0
3) Start to build
Finally we are going to use build command for docker
4) Check the images
5) Tagging the image
You are going to tag “python-docker” image by using “docker tag” command with v1.0.0 version.
6) Remove the tag
Use “docker rmi” command to remove the tag for image.