简体   繁体   English

python:无法打开文件'python2':[Errno 2]没有这样的文件或目录

[英]python: can't open file 'python2': [Errno 2] No such file or directory

im trying to run my docker-compose and I keep getting this error whenever running docker-compose up This is my dockerfile:我试图运行我的 docker-compose 并且每次运行 docker-compose 时都会出现此错误 这是我的 dockerfile:

FROM python:3.7
ADD . /todo
WORKDIR /todo
RUN pip install -r requirements.txt

My docker-compose:我的 docker-compose:

web:
  build: .
  command: python2 -u app.py
  ports:
    - "5000:5000"
      #volumes:
      # - .:/todo
  links:
    - db
db:
  image: mongo:3.0.2

~ ~
any help would be greatly appreciated I've been stuck on this for a while!任何帮助将不胜感激我已经坚持了一段时间!

I figured out the problem.我解决了这个问题。
Make sure that you dump your containers and images before running docker-compose up and the error should go away.确保在运行 docker-compose 之前转储容器和图像,并且错误应该 go 消失。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python:无法打开文件“帮助”:[Errno 2]没有此类文件或目录 - python: can't open file 'help': [Errno 2] No such file or directory python:无法打开文件“C:\\Program”:[Errno 2] 没有这样的文件或目录 - python: can't open file 'C:\Program': [Errno 2] No such file or directory 无法打开文件'python':[Errno 2]没有这样的文件或目录 - can't open file 'python': [Errno 2] No such file or directory PyCharm 没有找到 Anaconda Python,给出“无法打开文件 'python':[Errno 2] 没有这样的文件或目录?” - PyCharm not finding Anaconda Python, giving "can't open file 'python': [Errno 2] No such file or directory?" python:无法打开文件'python DACscrap.py&':[Errno 2]没有这样的文件或目录…但是可以吗? - python: can't open file 'python DACscrap.py &': [Errno 2] No such file or directory… but it does? PyCharm 没有找到 Anaconda Python,给出“无法打开文件 'python.py':[Errno 2] 没有这样的文件或目录?” - PyCharm not finding Anaconda Python, giving “can't open file 'python.py': [Errno 2] No such file or directory?” 在Python中使用3to2,得到“ python:无法打开文件'3to2':[Errno 2]没有这样的文件或目录” - Using 3to2 in Python, get “python: can't open file '3to2': [Errno 2] No such file or directory” 无法打开文件:[Errno 2] 没有那个文件或目录 - can't open file : [Errno 2] No such file or directory 无法打开文件:[Errno 2] 没有那个文件或目录 - can't open file : [Errno 2] No such file or directory 无法打开文件 [Errno 2] 没有这样的文件或目录 - Can't Open File [Errno 2 ] No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM