我正在使用Bamboo运行python应用程序(Flask应用程序)。
并成功地从存储库中签出源代码,并使用Bamboo本身创建docker镜像。
并尝试使用Bamboo docker任务运行图像,错误低于Connection refused
。
我该如何解决这个问题。
Failed connecting to http://localhost:5000, error: Connection refused (Connection refused)
Attempting connection to http://localhost:5000
Failed connecting to http://localhost:5000, error: Connection refused (Connection refused)
Attempting connection to http://localhost:5000
Failed connecting to http://localhost:5000, error: Connection refused (Connection refused)
Attempting connection to http://localhost:5000
Failed connecting to http://localhost:5000, error: Connection refused (Connection refused)
Attempting connection to http://localhost:5000
Failed connecting to http://localhost:5000, error: Connection refused (Connection refused)
Docker文件:
FROM python
COPY . /app
WORKDIR /app
RUN pip install -r python_modules.txt
ENTRYPOINT ["python"]
CMD ["app.py"]
答案 0 :(得分:1)
在没有看到docker文件的情况下,好像端口未打开。
ENTRYPOINT python app.py
EXPOSE 5000