将docker镜像部署到heroku时出现“找不到Python3”错误

时间:2018-05-27 22:37:28

标签: python django python-3.x docker heroku

所以我正在尝试使用我的docker文件将我的django驱动的web应用程序部署到heroku但是我一直收到“找不到python3”的错误。请注意,我现在使用zeit部署了同样的应用程序。我的dockerfile看起来像这样:

FROM mhart/alpine-node

RUN echo "ipv6" >> /etc/modules
RUN echo "http://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories

RUN apk add --no-cache python3 yarn && python3 -m ensurepip
RUN mkdir /code
WORKDIR /code
COPY .  /code
RUN pip3 install -r requirements.txt
RUN yarn
RUN yarn build:dev
EXPOSE $PORT
CMD [python3 manage.py runserver 0.0.0.0:$PORT ]

我还在heroku上附上了我的应用程序日志的屏幕截图。

enter image description here

我尝试添加python3包的完整路径,如/usr/bin/python3,但它仍然失败。任何帮助将不胜感激

0 个答案:

没有答案