Fix: update Dockerfile to use local Nexus APT repositories
This commit is contained in:
+17
-13
@@ -19,19 +19,23 @@ ENV HTTPS_PROXY=${https_proxy}
|
|||||||
|
|
||||||
# =========================================================
|
# =========================================================
|
||||||
# System dependencies & Extensions
|
# System dependencies & Extensions
|
||||||
|
# Redirect APT Repositories to Local Nexus (10.15.39.186)
|
||||||
# =========================================================
|
# =========================================================
|
||||||
|
|
||||||
RUN apt-get update -o Acquire::Retries=5 && apt-get install -y --no-install-recommends --fix-missing \
|
RUN sed -i 's|http://deb.debian.org/debian|http://10.15.39.186:8081/repository/debian-proxy/|g' /etc/apt/sources.list \
|
||||||
nginx \
|
&& sed -i 's|http://security.debian.org/debian-security|http://10.15.39.186:8081/repository/debian-security-proxy/|g' /etc/apt/sources.list \
|
||||||
vim \
|
&& apt-get update -o Acquire::Retries=5 \
|
||||||
wget \
|
&& apt-get install -y --no-install-recommends --fix-missing \
|
||||||
libpng-dev \
|
nginx \
|
||||||
libjpeg-dev \
|
vim \
|
||||||
libfreetype6-dev \
|
wget \
|
||||||
libzip-dev \
|
libpng-dev \
|
||||||
libaio1 \
|
libjpeg-dev \
|
||||||
libaio-dev \
|
libfreetype6-dev \
|
||||||
unzip \
|
libzip-dev \
|
||||||
|
libaio1 \
|
||||||
|
libaio-dev \
|
||||||
|
unzip \
|
||||||
&& docker-php-ext-configure gd \
|
&& docker-php-ext-configure gd \
|
||||||
--with-freetype \
|
--with-freetype \
|
||||||
--with-jpeg \
|
--with-jpeg \
|
||||||
@@ -56,7 +60,7 @@ RUN pear config-set http_proxy "http://10.15.3.20:80" || true
|
|||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
|
|
||||||
# Copy file composer terlebih dahulu agar Docker Cache aktif
|
# Copy composer files terlebih dahulu agar Docker Caching layer aktif
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
|
|
||||||
RUN composer install \
|
RUN composer install \
|
||||||
@@ -66,7 +70,7 @@ RUN composer install \
|
|||||||
--no-scripts \
|
--no-scripts \
|
||||||
--optimize-autoloader
|
--optimize-autoloader
|
||||||
|
|
||||||
# Copy seluruh source code setelah composer install selesai
|
# Copy seluruh source code project
|
||||||
COPY --chown=www-data:www-data . .
|
COPY --chown=www-data:www-data . .
|
||||||
|
|
||||||
# =========================================================
|
# =========================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user