pyhotn3.8 apt机器基础镜像构建

FROM python:3.8.10-slim

RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \
    apt-get update && \
    apt-get install -y build-essential gcc g++ libssl-dev python3-dev swig libldap2-dev libsasl2-dev libpq-dev \
    vim \
    telnet \
    dnsutils \
    net-tools \
    inetutils-ping \
    iptables \
    curl \
    procps \
    wait-for-it \
    ssh && \
    apt-get autoclean
    libpq-dev

RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
COPY requirements.txt /tmp/
RUN /usr/local/bin/python -m pip install --upgrade pip && \
    pip3 install --no-cache-dir  -r /tmp/requirements.txt
posted @ 2023-12-15 18:00  干炸小黄鱼  阅读(35)  评论(0编辑  收藏  举报