简体   繁体   中英

Docker Run Stops Working /bin/bash: entrypoint.sh: No such file or directory

I am having trouble with running my flask app in a docker container. The docker container will build and run for a while. Then it will just throw this: /bin/bash: entrypoint.sh: No such file or directory, when trying to run at a different time. I am building a container before each run, and there are no active containers before that. Anyone have any ideas on to what might be happening?

Dockerfile:

FROM python:2.7.14

COPY ["requirements.txt", "requirements.txt"]
RUN ["pip", "install", "--upgrade", "pip==9.0.3"]
#RUN ["pip", "install", "rollbar", "--upgrade"]
#RUN ["pip", "install", "raven[flask]"]
RUN ["pip", "install", "-r", "requirements.txt"]

ENV environment production
EXPOSE 80

ADD . /error_reporting_poc
WORKDIR /error_reporting_pocdocker-compose.yml

ENTRYPOINT ["/bin/bash", "entrypoint.sh"]

CMD ["python", "main.py", "-OO"]

I ran docker container run -it --rm --entrypoint find python:2.7.14 / -name entrypoint.sh and obtained no results. Your dockerfile did not provide 'entrypoint.sh'

You need to provide the 'entrypoint.sh' script.

What you probably want to do is

  1. Replace ENTRYPOINT ["/bin/bash", "entrypoint.sh"] with ENTRYPOINT ["python2"]
  2. Replace CMD ["python", "main.py", "-OO"] with CMD ["main.py", "-00"]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM