Browse Source

small flask

master
Adrien MAES 1 year ago
commit
6bab8a0a0c
  1. 7
      Dockerfile
  2. 10
      app.py

7
Dockerfile

@ -0,0 +1,7 @@
FROM ubuntu:latest
RUN apt update -y
RUN apt install python3 -y
RUN apt install python3-pip -y
RUN pip3 install flask
COPY app.py /home/app.py
ENTRYPOINT FLASK_APP=/home/app.py flask run --host=0.0.0.0

10
app.py

@ -0,0 +1,10 @@
from flask import Flask
app = Flask(__name__)
@app.route("/api")
def api():
return "bonjour de l'api"
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080)
Loading…
Cancel
Save