docker安装教程

https://docs.docker.com/get-started/part2/#build-the-app

相关帖子

https://stackoverflow.com/questions/32207202/multiple-django-requirements-with-docker

dockerfile

# Use an official Python runtime as a parent image
FROM python:2.7-slim # Set the working directory to /app
WORKDIR /appl # Copy the current directory contents into the container at /app
ADD . /app # Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt # Make port 80 available to the world outside this container
EXPOSE 80 # Define environment variable
ENV NAME World # Run app.py when the container launches
CMD ["python", "app.py"]

在使用

docker build -t friendly2 .

指令安装时,出现警告

Could not open requirements fils: [Errno 2] No such file or directory: 'requirments.txt'
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code:1

解决方法,修改dockerfile,增加语句:

COPY requirements.txt requirements.txt

Docker build 安装报错, Could not open requirments file: [Errno 2] No such file or directory:'requirements.txt'的更多相关文章

  1. mydumper 安装报错处理

    mydumper 官网:https://launchpad.net/mydumper 下载之后,安装报错: [root@localhost local]# cd mydumper-0.6.2 [roo ...

  2. Scrapy安装报错

    python3 pip 安装Scrapy在win10 安装报错error: Microsoft Visual C++ 14.0 is required. Get it with "Micro ...

  3. RedisDump安装报错

    环境:win10 首先安装 Ruby 安装好后,使用命令行 gem install redis-dump 在安装过程中始终报错,意思是无法使用make命令 然后安装make 参考教程: http:// ...

  4. pip安装报错处理+PyPi源切换教程

    一.pip安装出错类型 1.1 pip版本过旧导致不能安装 报错提示: You are using pip version 9.0.3, however version 10.0.1 is avail ...

  5. MSSQL 2012安装报错之0x858C001B

    之前安装 Microsoft Sql Server 2012 R2 的时候总是报这样的错误: SQL Server Setup has encountered the following error: ...

  6. linux -小记(2)问题:yum 安装报错"Another app is currently holding the yum lock; waiting for it to exit... ...: yum Memory : 26 M RSS (868 MB VSZ) Started: Wed Oct 26 22:48:24 2016 - 0"

    yum 安装报错 "Another app is currently holding the yum lock; waiting for it to exit... The other ap ...

  7. office2010安装报错

    有没有童鞋,在第一次安装office 2010的时候,中途不管是何原因导致中断或者未安装成功的 然后从第二次开始就一直安装报错??? 哈哈,我最近就遇到了 其他很简单,网上有很多方法,也有很多步骤,包 ...

  8. yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between

    yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between attempted installs of php-pecl-f ...

  9. 关于eclipse(64位)下aptana插件安装报错问题解决

    最近一直没有写过js,换了新电脑以后,eclipse下的aptana插件也没有装过,这几天要写js想重新把aptana装上,但是不知怎的,link方式.在线安装方式还有离线包下载下来利用eclipse ...

随机推荐

  1. 2016 Multi-University Training Contest 10 [HDU 5861] Road (线段树:区间覆盖+单点最大小)

    HDU 5861 题意 在n个村庄之间存在n-1段路,令某段路开放一天需要交纳wi的费用,但是每段路只能开放一次,一旦关闭将不再开放.现在给你接下来m天内的计划,在第i天,需要对村庄ai到村庄bi的道 ...

  2. 《高性能mysql》笔记

    组合索引和sql中的顺序有关 单列索引和sql中的顺序无关

  3. yii2下的路由重写

    1.在config/main.php中添加配置信息 文件位置如图所示(图中展示的是backend下的config,也可以在fronted和common的config中添加) 配置的代码标准格式如下 ' ...

  4. python 基础内置函数表及简单介绍

    内建函数名 (表达形式) 主要作用 备注 abs(x) 返回一个X值得绝对值(x=int/float/复数) all(iterable) 如果 iterable 的所有元素均为 True(或 iter ...

  5. MySQL · 引擎特性 · InnoDB index lock前世今生

    http://mysql.taobao.org/monthly/2015/07/05/ MySQL · 引擎特性 · InnoDB index lock前世今生 前言 InnoDB并发过程中使用两类锁 ...

  6. 夜神模拟器连不上adb的解决办法

    解决办法: 1.任务管理器里看下,adb.exe以及nox_adb.exe这2个进程有没有在运行?有的话就结束掉 2.找到开发环境的SDK的目录和夜神模拟器的目录,将SDK\platform-tool ...

  7. Vue ajax跨域请求

    Vue webpack-dev-server实现跨域请求 思路 配置webpack-dev-server,代理某一个路径到目标路径,同是更改源和重写 Vue里定义一个全部变量:site Vue.pro ...

  8. MongoDB Windows环境搭建

    简介 MongoDB 是由C++语言编写的,是一个基于分布式文件存储的开源数据库系统. 在高负载的情况下,添加更多的节点,可以保证服务器性能. MongoDB 旨在为WEB应用提供可扩展的高性能数据存 ...

  9. easyui combobox with checkbox item

    $('#cc').combobox({ url:'combobox_data1.json', method:'get', valueField:'id', textField:'text', pane ...

  10. Spring的注解积累

    需要在applicationContext.xml中注册: 如:在base-package指明一个包 <context:component-scan base-package="cn. ...