26 lines
645 B
Docker
26 lines
645 B
Docker
FROM python:3.12-slim-bookworm
|
|
|
|
ARG http_proxy
|
|
ARG https_proxy
|
|
ARG no_proxy
|
|
|
|
ENV http_proxy=${http_proxy}
|
|
ENV https_proxy=${https_proxy}
|
|
ENV no_proxy=${no_proxy}
|
|
|
|
# تنظیم proxy برای apt
|
|
RUN echo "Acquire::http::Proxy \"$http_proxy\";" > /etc/apt/apt.conf.d/99proxy && \
|
|
echo "Acquire::https::Proxy \"$https_proxy\";" >> /etc/apt/apt.conf.d/99proxy
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
git \
|
|
util-linux \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# حذف proxy بعد از نصب
|
|
RUN rm -f /etc/apt/apt.conf.d/99proxy
|
|
|
|
# ادامه دستورات خودت...
|