Fix: overwrite sources.list completely and bypass proxy for apt-get
This commit is contained in:
+9
-13
@@ -19,13 +19,15 @@ ENV HTTPS_PROXY=${https_proxy}
|
|||||||
|
|
||||||
# =========================================================
|
# =========================================================
|
||||||
# System dependencies & Extensions
|
# System dependencies & Extensions
|
||||||
# Redirect APT Repositories to Local Nexus (10.15.39.186)
|
# Timpa total sources.list dan bypass proxy eksternal
|
||||||
# =========================================================
|
# =========================================================
|
||||||
|
|
||||||
RUN sed -i 's|http://deb.debian.org/debian|http://10.15.39.186:8081/repository/debian-proxy/|g' /etc/apt/sources.list \
|
RUN echo "deb http://10.15.39.186:8081/repository/debian-proxy/ bullseye main" > /etc/apt/sources.list \
|
||||||
&& sed -i 's|http://security.debian.org/debian-security|http://10.15.39.186:8081/repository/debian-security-proxy/|g' /etc/apt/sources.list \
|
&& echo "deb http://10.15.39.186:8081/repository/debian-proxy/ bullseye-updates main" >> /etc/apt/sources.list \
|
||||||
&& apt-get update -o Acquire::Retries=5 \
|
&& echo "deb http://10.15.39.186:8081/repository/debian-security-proxy/ bullseye-security main" >> /etc/apt/sources.list \
|
||||||
&& apt-get install -y --no-install-recommends --fix-missing \
|
&& rm -rf /etc/apt/sources.list.d/* \
|
||||||
|
&& env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY apt-get update \
|
||||||
|
&& env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY apt-get install -y --no-install-recommends \
|
||||||
nginx \
|
nginx \
|
||||||
vim \
|
vim \
|
||||||
wget \
|
wget \
|
||||||
@@ -36,14 +38,8 @@ RUN sed -i 's|http://deb.debian.org/debian|http://10.15.39.186:8081/repository/d
|
|||||||
libaio1 \
|
libaio1 \
|
||||||
libaio-dev \
|
libaio-dev \
|
||||||
unzip \
|
unzip \
|
||||||
&& docker-php-ext-configure gd \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
--with-freetype \
|
&& docker-php-ext-install gd pdo pdo_mysql zip \
|
||||||
--with-jpeg \
|
|
||||||
&& docker-php-ext-install \
|
|
||||||
gd \
|
|
||||||
pdo \
|
|
||||||
pdo_mysql \
|
|
||||||
zip \
|
|
||||||
&& pecl install redis \
|
&& pecl install redis \
|
||||||
&& docker-php-ext-enable redis \
|
&& docker-php-ext-enable redis \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|||||||
Reference in New Issue
Block a user