задание 1 докер

This commit is contained in:
Смелянец 2025-11-13 09:03:59 +00:00
commit 53767505d9
3 changed files with 17 additions and 0 deletions

7
dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 80
CMD ["python", "main.py"]

9
main.py Normal file
View File

@ -0,0 +1,9 @@
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "Привет из Docker!"
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=80)

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
Flask