задание 1 докер
This commit is contained in:
commit
53767505d9
7
dockerfile
Normal file
7
dockerfile
Normal 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
9
main.py
Normal 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
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Flask
|
||||||
Loading…
Reference in New Issue
Block a user