docker alpine:3.8 环境安装 openssl-dev 和 mariadb-connector-c-dev 显示 conflicts,有啥其他解决办法吗?
需求:两个包都必须安全 dev 版,mariadb-connector-c-dev 是为了解决 pip 安装 mysqlclient 的问题,openssl-dev 是解决 DTLS 的问题。
Dockerfile
FROM alpine:3.8
# Install dependencies
RUN apk add --no-cache git tcpdump ipmitool build-base python3-dev py3-pip py3-cffi libxml2-dev libxslt-dev libffi-dev openssl-dev mariadb-connector-c-dev
RUN adduser -s /bin/bash -D conpot
WORKDIR /opt/
RUN git clone --depth=1 https://github.com/mushorg/conpot.git
RUN chown conpot:conpot -R /opt/conpot
# Install Python requirements
USER conpot
WORKDIR /opt/conpot
RUN pip3 install --user --no-cache-dir --upgrade pip setuptools
RUN pip3 install --user --no-cache-dir coverage
RUN pip3 install --user --no-cache-dir -r requirements.txt
# Install the Conpot application
RUN python3 setup.py install --user --prefix=
ENV PATH=$PATH:/home/conpot/.local/bin
RUN py.test -v
1
julyclyde 2020-08-12 10:08:01 +08:00
试试用 pymysql 代替?纯 python 实现的 mysql 客户端库,支持 monkeypatch
|