python - "Python3 not found" error when deploying docker image to heroku
问题描述
So I'm trying to deploy my django powered web app to heroku using my docker file, But I keep getting a "python3 not found" error. Note that I've deployed this same application using zeit's now. My dockerfile looks like so:
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 ]
I've also attached a screenshot of my application's logs on heroku.
I tried adding the full path to the python3 package like so /usr/bin/python3
but it still failed. Any help would be appreciated
解决方案
推荐阅读
- react-native - 在 React native Expo 中使用别名作为文件路径
- pyspark - 如何控制 Hive 分区数据集中的文件数?
- vmware - Smbclient - vmware LINUX guest 和 windows Host - 打开本地文件时出错
- deployment - 在部署期间如何保护我的项目源代码?
- python - 为列表中的多个条件选择最佳状态
- sql-update - 如何使用子查询更新 clickhouse 数据?
- r - 使用 dcast R 进行数据操作
- javascript - 如何绘制现有绘制的画布元素?
- json - 如何使用 unix cmd/shell 脚本漂亮地打印 JSON?
- html - 文本在css中悬停时仍然隐藏?