From 808bd72d13b006963be8441e3894ecfebe290c1b Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Sun, 27 May 2018 10:06:00 +0800 Subject: [PATCH] Fix #1544, Unable to locate package libgmp-dev. (#1569) * Fix #1544, Unable to locate package libgmp-dev. --- php-fpm/Dockerfile | 5 +++-- workspace/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 02725b94..096be5e3 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -18,6 +18,9 @@ FROM laradock/php-fpm:2.2-${PHP_VERSION} LABEL maintainer="Mahmoud Zalt " +# always run apt update when start and after add new source list, then clean up at end. +RUN apt-get update -yqq + # #-------------------------------------------------------------------------- # Mandatory Software's Installation @@ -49,7 +52,6 @@ ARG INSTALL_SOAP=false RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the soap extension rm /etc/apt/preferences.d/no-debian-php && \ - apt-get update -yqq && \ apt-get -y install libxml2-dev php-soap && \ docker-php-ext-install soap \ ;fi @@ -296,7 +298,6 @@ ARG INSTALL_INTL=false RUN if [ ${INSTALL_INTL} = true ]; then \ # Install intl and requirements - apt-get update -yqq && \ apt-get install -y zlib1g-dev libicu-dev g++ && \ docker-php-ext-configure intl && \ docker-php-ext-install intl \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index edd42da6..fdc3c2ef 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -31,7 +31,9 @@ ENV PUID ${PUID} ARG PGID=1000 ENV PGID ${PGID} -RUN groupadd -g ${PGID} laradock && \ +# always run apt update when start and after add new source list, then clean up at end. +RUN apt-get update -yqq && \ + groupadd -g ${PGID} laradock && \ useradd -u ${PUID} -g laradock -m laradock -G docker_env && \ usermod -p "*" laradock @@ -667,7 +669,6 @@ USER root ARG INSTALL_IMAGEMAGICK=false RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get update && \ apt-get install -y --force-yes imagemagick php-imagick \ ;fi