V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
DaFee
V2EX  ›  Docker

请教个 docker 环境问题

  •  
  •   DaFee · 2020-08-11 17:28:42 +08:00 · 1502 次点击
    这是一个创建于 1347 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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
    
    2 条回复    2020-08-12 13:46:12 +08:00
    julyclyde
        1
    julyclyde  
       2020-08-12 10:08:01 +08:00
    试试用 pymysql 代替?纯 python 实现的 mysql 客户端库,支持 monkeypatch
    DaFee
        2
    DaFee  
    OP
       2020-08-12 13:46:12 +08:00
    @julyclyde 那个 requirements.txt 里面写的是 mysqlclient,我准备把 alpine 换成 ubuntu 试试。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2958 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 03:41 · PVG 11:41 · LAX 20:41 · JFK 23:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.