Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Use an official Python runtime as a parent image
- # 使用官方的Python环境做为父镜像(parent)
- FROM python:2.7-slim
- # Set the working directory to /app
- # 设置容器内的当前工作目录为 /app
- WORKDIR /app
- # Copy the current directory contents into the container at /app
- # 复制当前文件夹内容到容器的 /app 目录下
- COPY . /app
- # Install any needed packages specified in requirements.txt
- # 安装requirements.txt中列出的python包
- RUN pip install --trusted-host pypi.python.org -r requirements.txt
- # Make port 80 available to the world outside this container
- # 对外暴露 80 端口
- EXPOSE 80
- # Define environment variable
- # 定义环境变量 NAME=World
- ENV NAME World
- # Run app.py when the container launches
- # 容器启动时默认运行 python app.py
- CMD ["python", "app.py"]
Add Comment
Please, Sign In to add comment