我对 Docker 和部署周期有点陌生。
我有 Django 应用程序,我们想使用 uWSGI 将其部署到 docker 容器。实际上部署工作了几个星期,但现在它完全报告错误......
与密码学包一起出现的错误接缝:
build/temp.linux-x86_64-3.6/_openssl.c:52862:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
build/temp.linux-x86_64-3.6/_openssl.c: In function '_cffi_f_SSL_set_options':
build/temp.linux-x86_64-3.6/_openssl.c:52895:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
{ result = SSL_set_options(x0, x1); }
^~~~~~~~~~~~~~~
build/temp.linux-x86_64-3.6/_openssl.c:52895:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-dg_tg9pa/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-my98rwq4/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-dg_tg9pa/cryptography/
The command '/bin/sh -c pip install --no-cache-dir -r requirements.txt' returned a non-zero code: 1
ERROR: Job failed: exit code 1
我们的 docker 文件看起来像
FROM python:3-alpine
ENV PYTHONUNBUFFERED 1
WORKDIR /usr/src/app
RUN apk add --no-cache gcc mailcap python3-dev build-base linux-headers pcre-dev postgresql-dev libffi-dev libressl-dev
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
正如我提到的,docker 文件和require.txt 在成功构建和失败构建之间没有变化。(对我来说最奇怪的是什么……)
我唯一能想到的就是那个命令
FROM python:3-alpine
正在服用不同版本的alpine...
这可能吗?有什么问题?如何解决?