39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
# Pre-install proxy configuration values
|
|
#
|
|
# This uses the linux-ftp.ostc.intel.com as a mirror.
|
|
RUN { \
|
|
for suite in ${OS_RELEASE} ${OS_RELEASE}-updates ${OS_RELEASE}-security ${OS_RELEASE}-backports; do \
|
|
for component in main restricted universe multiverse; do \
|
|
echo "deb http://linux-ftp.ostc.intel.com/pub/mirrors/${OS_DISTRO} ${suite} ${component}" ; \
|
|
done \
|
|
done \
|
|
} > /etc/apt/sources.list
|
|
|
|
# Retry downloads up to 100 times to work around linux-ftp issue...
|
|
RUN echo 'APT::Acquire::Retries "100";' > /etc/apt/apt.conf.d/80-retries
|
|
|
|
ARG http_proxy="http://proxy-chain.intel.com:911/"
|
|
ARG https_proxy="http://proxy-chain.intel.com:912/"
|
|
ARG ftp_proxy="ftp://proxy-chain.intel.com:911/"
|
|
ARG socks_proxy="socks://proxy-chain.intel.com:1080/"
|
|
ARG no_proxy="localhost,*.*.intel.com"
|
|
|
|
ENV http_proxy="${http_proxy}"
|
|
ENV https_proxy="${https_proxy}"
|
|
ENV no_proxy="${no_proxy}"
|
|
ENV ftp_proxy="${http_proxy}"
|
|
ENV socks_proxy="${socks_proxy}"
|
|
|
|
ENV HTTP_PROXY="${http_proxy}"
|
|
ENV HTTPS_PROXY="${http_proxy}"
|
|
ENV NO_PROXY="${no_proxy}"
|
|
|
|
RUN { \
|
|
echo "Acquire::http::proxy \"${http_proxy}\";\n" ; \
|
|
echo "Acquire::https::proxy \"${https_proxy}\";\n" ; \
|
|
echo "Acquire::ftp::proxy \"${ftp_proxy}\";\n" ; \
|
|
echo "Acquire::socks::proxy \"${socks_proxy}\";\n" ; \
|
|
echo "Acquire::http::Proxy::linux-ftp.ostc.intel.com DIRECT;\n" ; \
|
|
} > /etc/apt/apt.conf
|
|
|