diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..67caecf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '1.0' +services: + python-app: + build: . + container_name: python-app + volumes: + - ./:/app + ports: + - "5555:5555" # 如果需要暴露 Flask 端口 diff --git a/dockerfile b/dockerfile index eb6fb0b..ee89b39 100644 --- a/dockerfile +++ b/dockerfile @@ -1,7 +1,7 @@ FROM python:latest WORKDIR /app +COPY . . RUN pip install --no-cache-dir -r requirements.txt RUN python setup.py install -COPY . /app -EXPOSE 5555 -CMD ["python", "/app/alibabacloud_sample/main.py"] \ No newline at end of file + +CMD ["python", "alibabacloud_sample/main.py"] \ No newline at end of file