Guest User

Untitled

a guest
Oct 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. # Use an official Python runtime as a parent image
  2. # 使用官方的Python环境做为父镜像(parent)
  3. FROM python:2.7-slim
  4.  
  5. # Set the working directory to /app
  6. # 设置容器内的当前工作目录为 /app
  7. WORKDIR /app
  8.  
  9. # Copy the current directory contents into the container at /app
  10. # 复制当前文件夹内容到容器的 /app 目录下
  11. COPY . /app
  12.  
  13. # Install any needed packages specified in requirements.txt
  14. # 安装requirements.txt中列出的python包
  15. RUN pip install --trusted-host pypi.python.org -r requirements.txt
  16.  
  17. # Make port 80 available to the world outside this container
  18. # 对外暴露 80 端口
  19. EXPOSE 80
  20.  
  21. # Define environment variable
  22. # 定义环境变量 NAME=World
  23. ENV NAME World
  24.  
  25. # Run app.py when the container launches
  26. # 容器启动时默认运行 python app.py
  27. CMD ["python", "app.py"]
Add Comment
Please, Sign In to add comment