Update Dockerfile
This commit is contained in:
+13
-10
@@ -2,24 +2,27 @@ FROM python:3.12-slim-bookworm
|
|||||||
|
|
||||||
ARG http_proxy
|
ARG http_proxy
|
||||||
ARG https_proxy
|
ARG https_proxy
|
||||||
|
ARG HTTP_PROXY
|
||||||
|
ARG HTTPS_PROXY
|
||||||
ARG no_proxy
|
ARG no_proxy
|
||||||
|
ARG NO_PROXY
|
||||||
|
|
||||||
ENV http_proxy=${http_proxy}
|
ENV http_proxy=${http_proxy}
|
||||||
ENV https_proxy=${https_proxy}
|
ENV https_proxy=${https_proxy}
|
||||||
|
ENV HTTP_PROXY=${HTTP_PROXY}
|
||||||
|
ENV HTTPS_PROXY=${HTTPS_PROXY}
|
||||||
ENV no_proxy=${no_proxy}
|
ENV no_proxy=${no_proxy}
|
||||||
|
ENV NO_PROXY=${NO_PROXY}
|
||||||
|
|
||||||
# تنظیم proxy برای apt
|
RUN echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/99proxy && \
|
||||||
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
|
||||||
echo "Acquire::https::Proxy \"$https_proxy\";" >> /etc/apt/apt.conf.d/99proxy
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
apt-get install -y --no-install-recommends \
|
git \
|
||||||
git \
|
util-linux \
|
||||||
util-linux \
|
ca-certificates \
|
||||||
ca-certificates \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# حذف proxy بعد از نصب
|
|
||||||
RUN rm -f /etc/apt/apt.conf.d/99proxy
|
RUN rm -f /etc/apt/apt.conf.d/99proxy
|
||||||
|
|
||||||
# ادامه دستورات خودت...
|
# از اینجا به بعد دستورات اصلی پروژهات
|
||||||
|
|||||||
Reference in New Issue
Block a user