烧瓶应用程序已启动,但我无法从浏览器中查看任何内容。
root@1ec89cb3dad1:/app# python main.py
* Serving Flask app "main" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 231-587-342
Dockerfile如下所示:
FROM ubuntu
RUN apt-get update -y && \
apt-get install -y python-pip python-dev libhunspell-dev
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
COPY . /app
ENTRYPOINT [ "python" ]
CMD [ "main.py" ]
文件在这里。。。
https://github.com/shantanuo/Spell-Checker/tree/master
我不知道该不该给docker或flask贴标签!
更新:
我使用这些命令来构建和运行图像。。。
git clone https://github.com/shantanuo/Spell-Checker.git
cd Spell-Checker/
docker build -t shantanuo/flask .
docker run -p 5000:5000 shantanuo/flask