Skip to content

Commit 808bd72

Browse files
authored
Fix laradock#1544, Unable to locate package libgmp-dev. (laradock#1569)
* Fix laradock#1544, Unable to locate package libgmp-dev.
1 parent 07410e8 commit 808bd72

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

php-fpm/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ FROM laradock/php-fpm:2.2-${PHP_VERSION}
1818

1919
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
2020

21+
# always run apt update when start and after add new source list, then clean up at end.
22+
RUN apt-get update -yqq
23+
2124
#
2225
#--------------------------------------------------------------------------
2326
# Mandatory Software's Installation
@@ -49,7 +52,6 @@ ARG INSTALL_SOAP=false
4952
RUN if [ ${INSTALL_SOAP} = true ]; then \
5053
# Install the soap extension
5154
rm /etc/apt/preferences.d/no-debian-php && \
52-
apt-get update -yqq && \
5355
apt-get -y install libxml2-dev php-soap && \
5456
docker-php-ext-install soap \
5557
;fi
@@ -296,7 +298,6 @@ ARG INSTALL_INTL=false
296298

297299
RUN if [ ${INSTALL_INTL} = true ]; then \
298300
# Install intl and requirements
299-
apt-get update -yqq && \
300301
apt-get install -y zlib1g-dev libicu-dev g++ && \
301302
docker-php-ext-configure intl && \
302303
docker-php-ext-install intl \

workspace/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ ENV PUID ${PUID}
3131
ARG PGID=1000
3232
ENV PGID ${PGID}
3333

34-
RUN groupadd -g ${PGID} laradock && \
34+
# always run apt update when start and after add new source list, then clean up at end.
35+
RUN apt-get update -yqq && \
36+
groupadd -g ${PGID} laradock && \
3537
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
3638
usermod -p "*" laradock
3739

@@ -667,7 +669,6 @@ USER root
667669
ARG INSTALL_IMAGEMAGICK=false
668670

669671
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
670-
apt-get update && \
671672
apt-get install -y --force-yes imagemagick php-imagick \
672673
;fi
673674

0 commit comments

Comments
 (0)