- 新增 docker-compose.yml 文件,配置 Python 应用服务 - 更新 Dockerfile: - 调整文件结构,先复制再安装依赖 - 移除冗余的 COPY 指令 - 更新 CMD 指令,简化路径 - 注释掉端口映射,可根据需要手动配置
7 lines
166 B
Plaintext
7 lines
166 B
Plaintext
FROM python:latest
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
RUN python setup.py install
|
|
|
|
CMD ["python", "alibabacloud_sample/main.py"] |