diff --git a/app/Dockerfile b/app/Dockerfile new file mode 100644 index 0000000..7e0defa --- /dev/null +++ b/app/Dockerfile @@ -0,0 +1,12 @@ +FROM debian:12-slim +RUN apt update +RUN apt install -y \ + python3 \ + python3-pip \ + python3-flask +RUN mkdir -p /app +COPY app.py /app +WORKDIR /app +EXPOSE 5000 +ENTRYPOINT ["python3"] +CMD ["app.py"] \ No newline at end of file diff --git a/app/app.py b/app/app.py new file mode 100644 index 0000000..1b4a5dd --- /dev/null +++ b/app/app.py @@ -0,0 +1,13 @@ +from flask import Flask +import os + +app = Flask(__name__) + +@app.route("/") +def hello(): + return "CyberHackademy 2023 inside a docker container!" + + +if __name__ == "__main__": + port = int(os.environ.get("PORT", 5000)) + app.run(debug=True,host='0.0.0.0',port=port)