Docker Tutorials | Dockefile to Create a Custom Image to Launch Simple Python Flask Application

Опубликовано: 30 Сентябрь 2024
на канале: VRTechnologies For Automation
1,256
21

Use below link and Learn any course freely for first two months
https://www.skillshare.com/r/user/nar...

Get Coupon Codes for my Udemy using below link:

   • Udemy Coupon Codes for Python, Shell,...  
Dockerfile:
---------------
FROM ubuntu:20.04
RUN apt-get update -y
RUN apt-get install python3 -y
RUN apt-get install python3-pip -y
RUN apt-get install vim -y
RUN pip3 install flask
COPY ./app.py /app.py
ENTRYPOINT python3 app.py

@app.route('/')
def index():
return " Python Flask in Docker! "
if _name_ == '__main__':
app.run(host= socket.gethostname(),port=5000)