From 69c9202304372cc898edcd58052a1645343575f6 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Sun, 7 May 2017 01:08:56 +0800 Subject: [PATCH 1/2] apt-get update just need run at first, after add-apt-repository or update apt source list. --- workspace/Dockerfile-56 | 10 ++++------ workspace/Dockerfile-70 | 16 ++++++---------- workspace/Dockerfile-71 | 18 ++++++++---------- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index 83e4cc13..701aa9e0 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -47,8 +47,8 @@ MAINTAINER Mahmoud Zalt ARG PUID=1000 ARG PGID=1000 RUN groupadd -g $PGID laradock && \ - useradd -u $PUID -g laradock -m laradock - + useradd -u $PUID -g laradock -m laradock && \ + apt-get update -yqq ##################################### # SOAP: @@ -60,8 +60,8 @@ ENV INSTALL_SOAP ${INSTALL_SOAP} RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the PHP SOAP extension - apt-get -y update && \ add-apt-repository -y ppa:ondrej/php && \ + apt-get update -yqq && \ apt-get -y install libxml2-dev php5.6-soap \ ;fi @@ -128,7 +128,6 @@ RUN echo "" >> ~/.bashrc && \ ARG INSTALL_XDEBUG=false RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # Load the xdebug extension only with phpunit commands - apt-get update && \ apt-get install -y --force-yes php5.6-xdebug && \ sed -i 's/^/;/g' /etc/php/5.6/cli/conf.d/20-xdebug.ini && \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ @@ -150,7 +149,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN} RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ curl -L https://packagecloud.io/gpg.key | apt-key add - && \ echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \ - apt-get update && \ + apt-get update -yqq && \ apt-get install blackfire-agent \ ;fi @@ -354,7 +353,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW} RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ # Preparation - apt-get update && \ apt-get upgrade -y && \ apt-get install -y build-essential make cmake scons curl git \ ruby autoconf automake autoconf-archive \ diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index b4b7af32..b4607580 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -47,8 +47,8 @@ MAINTAINER Mahmoud Zalt ARG PUID=1000 ARG PGID=1000 RUN groupadd -g $PGID laradock && \ - useradd -u $PUID -g laradock -m laradock - + useradd -u $PUID -g laradock -m laradock && \ + apt-get update -yqq ##################################### # SOAP: @@ -60,8 +60,8 @@ ENV INSTALL_SOAP ${INSTALL_SOAP} RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the PHP SOAP extension - apt-get -y update && \ add-apt-repository -y ppa:ondrej/php && \ + apt-get update -yqq && \ apt-get -y install libxml2-dev php7.0-soap \ ;fi @@ -128,7 +128,6 @@ RUN echo "" >> ~/.bashrc && \ ARG INSTALL_XDEBUG=false RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # Load the xdebug extension only with phpunit commands - apt-get update && \ apt-get install -y --force-yes php7.0-xdebug && \ sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini && \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ @@ -150,7 +149,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN} RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ curl -L https://packagecloud.io/gpg.key | apt-key add - && \ echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \ - apt-get update && \ + apt-get update -yqq && \ apt-get install blackfire-agent \ ;fi @@ -310,7 +309,7 @@ ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION} RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \ # Install the php V8JS extension add-apt-repository -y ppa:pinepain/libv8-5.4 \ - && apt-get update \ + && apt-get update -yqq \ && apt-get install -y php7.0-xml php7.0-dev php-pear libv8-5.4 \ && pecl install v8js \ && echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \ @@ -371,7 +370,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW} RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ # Preparation - apt-get update && \ apt-get upgrade -y && \ apt-get install -y build-essential make cmake scons curl git \ ruby autoconf automake autoconf-archive \ @@ -404,7 +402,6 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ # Install Depenencies: ##################################### cd / && \ - apt-get update && \ apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \ ##################################### @@ -421,13 +418,12 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ | tee /etc/apt/sources.list.d/dotdeb.list \ && wget -qO- https://www.dotdeb.org/dotdeb.gpg \ | apt-key add - \ - && apt-get update \ + && apt-get update -yqq \ && apt-get upgrade -qq && \ # Install UnixODBC # Compile odbc_config as it is not part of unixodbc package cd / && \ - apt-get update && \ apt-get install -y whiptail \ unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \ diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index f6ad96fb..8efc74c1 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -47,8 +47,8 @@ MAINTAINER Mahmoud Zalt ARG PUID=1000 ARG PGID=1000 RUN groupadd -g $PGID laradock && \ - useradd -u $PUID -g laradock -m laradock - + useradd -u $PUID -g laradock -m laradock && \ + apt-get update -yqq ##################################### # SOAP: @@ -60,8 +60,8 @@ ENV INSTALL_SOAP ${INSTALL_SOAP} RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the PHP SOAP extension - apt-get -y update && \ add-apt-repository -y ppa:ondrej/php && \ + apt-get update -yqq && \ apt-get -y install libxml2-dev php7.1-soap \ ;fi @@ -124,7 +124,6 @@ RUN echo "" >> ~/.bashrc && \ ARG INSTALL_XDEBUG=false RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # Load the xdebug extension only with phpunit commands - apt-get update && \ apt-get install -y --force-yes php-xdebug && \ sed -i 's/^/;/g' /etc/php/7.1/cli/conf.d/20-xdebug.ini && \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ @@ -146,7 +145,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN} RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ curl -L https://packagecloud.io/gpg.key | apt-key add - && \ echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \ - apt-get update && \ + apt-get update -yqq && \ apt-get install blackfire-agent \ ;fi @@ -306,7 +305,7 @@ ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION} RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \ # Install the php V8JS extension add-apt-repository -y ppa:pinepain/libv8-5.4 \ - && apt-get update \ + && apt-get update -yqq \ && apt-get install -y php-xml php-dev php-pear libv8-5.4 \ && pecl install v8js \ && echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \ @@ -367,7 +366,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW} RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ # Preparation - apt-get update && \ apt-get upgrade -y && \ apt-get install -y build-essential make cmake scons curl git \ ruby autoconf automake autoconf-archive \ @@ -400,7 +398,7 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ # Install Depenencies: ##################################### cd / && \ - apt-get update && \ + apt-get update -yqq && \ apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \ ##################################### @@ -417,13 +415,13 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ | tee /etc/apt/sources.list.d/dotdeb.list \ && wget -qO- https://www.dotdeb.org/dotdeb.gpg \ | apt-key add - \ - && apt-get update \ + && apt-get update -yqq \ && apt-get upgrade -qq && \ # Install UnixODBC # Compile odbc_config as it is not part of unixodbc package cd / && \ - apt-get update && \ + apt-get update -yqq && \ apt-get install -y whiptail \ unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \ From f162864e8971fd121045207fc172fdc68922684a Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Sun, 7 May 2017 01:17:35 +0800 Subject: [PATCH 2/2] apt-get update just need run at first, after add-apt-repository or update apt source list. --- php-fpm/Dockerfile-56 | 4 ++-- php-fpm/Dockerfile-70 | 12 ++++++------ php-fpm/Dockerfile-71 | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 176a0624..124bd49b 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt ARG INSTALL_SOAP=false RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the soap extension - apt-get -y update && \ + apt-get update -yqq && \ apt-get -y install libxml2-dev php-soap && \ docker-php-ext-install soap \ ;fi @@ -219,7 +219,7 @@ RUN if [ ${INSTALL_INTL} = true ]; then \ ARG INSTALL_GHOSTSCRIPT=false RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \ # Install the ghostscript extension for PDF editing - apt-get update && \ + apt-get update -yqq && \ apt-get install -y poppler-utils ghostscript \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 91c6f524..4ee90e80 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt ARG INSTALL_SOAP=false RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the soap extension - apt-get -y update && \ + apt-get update -yqq && \ apt-get -y install libxml2-dev php-soap && \ docker-php-ext-install soap \ ;fi @@ -212,7 +212,7 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ ARG INSTALL_INTL=false RUN if [ ${INSTALL_INTL} = true ]; then \ # Install intl and requirements - apt-get -y update && \ + apt-get update -yqq && \ apt-get install -y zlib1g-dev libicu-dev g++ && \ docker-php-ext-configure intl && \ docker-php-ext-install intl \ @@ -226,7 +226,7 @@ ARG INSTALL_GHOSTSCRIPT=false RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \ # Install the ghostscript extension # for PDF editing - apt-get -y update \ + apt-get update -yqq \ && apt-get install -y \ poppler-utils \ ghostscript \ @@ -242,7 +242,7 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # Install Depenencies: ##################################### - apt-get update && \ + apt-get update -yqq && \ apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \ ##################################### @@ -258,12 +258,12 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ | tee /etc/apt/sources.list.d/dotdeb.list \ && wget -qO- https://www.dotdeb.org/dotdeb.gpg \ | apt-key add - \ - && apt-get update \ + && apt-get update -yqq \ && apt-get upgrade -qq && \ # Install UnixODBC # Compile odbc_config as it is not part of unixodbc package - apt-get update && \ + apt-get update -yqq && \ apt-get install -y whiptail \ unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \ diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 9cb54cd9..a971c0e1 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt ARG INSTALL_SOAP=false RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the soap extension - apt-get -y update && \ + apt-get update -yqq && \ apt-get -y install libxml2-dev php-soap && \ docker-php-ext-install soap \ ;fi @@ -212,7 +212,7 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ ARG INSTALL_INTL=false RUN if [ ${INSTALL_INTL} = true ]; then \ # Install intl and requirements - apt-get -y update && \ + apt-get update -yqq && \ apt-get install -y zlib1g-dev libicu-dev g++ && \ docker-php-ext-configure intl && \ docker-php-ext-install intl \ @@ -226,7 +226,7 @@ ARG INSTALL_GHOSTSCRIPT=false RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \ # Install the ghostscript extension # for PDF editing - apt-get -y update \ + apt-get update -yqq \ && apt-get install -y \ poppler-utils \ ghostscript \ @@ -242,7 +242,7 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # Install Depenencies: ##################################### - apt-get update && \ + apt-get update -yqq && \ apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \ ##################################### @@ -258,12 +258,12 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ | tee /etc/apt/sources.list.d/dotdeb.list \ && wget -qO- https://www.dotdeb.org/dotdeb.gpg \ | apt-key add - \ - && apt-get update \ + && apt-get update -yqq \ && apt-get upgrade -qq && \ # Install UnixODBC # Compile odbc_config as it is not part of unixodbc package - apt-get update && \ + apt-get update -yqq && \ apt-get install -y whiptail \ unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \