错误的greenlet docker构建

时间:2018-07-10 01:09:00

标签: django python-3.x docker gevent greenlets

一切都好吗?我在使用docker build时遇到问题。此应用程序已经被安装在另外两台计算机上,但是每次发生此错误时。有谁知道我该怎么做才能解决它。我有一个Windows 10,我正在使用Docker Toolbox。

我在这里从站点尝试了此答案,但未成功:

Python module installation error: command 'gcc' failed with exit status 1

我遵循了码头工人自己的网站上的停靠教程:

https://docs.docker.com/compose/django/#define-the-project-components

Dockerfile

values

错误日志:

self.assertQuerysetEqual(family1.session_set.order_by('session_number'), list(family2.session_set.order_by('session_number')))

2 个答案:

答案 0 :(得分:5)

这是由于python 3.7(https://github.com/cython/cython/issues/1978)出现cython不兼容问题。

将您的图片名称修改为FROM python:3.6-stretch,这应该可以正常工作

答案 1 :(得分:5)

虽然 ClumsyPuffin 的解决方案效果很好,但它使用了更重的分布。 在安装要求之前,我只是通过在 Dockerfile 中添加以下行来解决这个问题。

RUN apk add build-base

<块引用>

build-base 是一个元包,它将安装 GCC、libc-dev 和 binutils 包(等等)。 https://wiki.alpinelinux.org/wiki/GCC