Преглед на файлове

Make Dockerfiles consistent between versions, move layers to bottom for smaller downloads for those using previous versions

Mark Shust преди 6 години
родител
ревизия
9bccafecdb
променени са 2 файла, в които са добавени 12 реда и са изтрити 11 реда
  1. 5 5
      images/php/7.1/Dockerfile
  2. 7 6
      images/php/7.2/Dockerfile

+ 5 - 5
images/php/7.1/Dockerfile

@@ -1,8 +1,6 @@
 FROM php:7.1-fpm
 MAINTAINER Mark Shust <mark@shust.com>
 
-RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
-
 RUN apt-get update && apt-get install -y \
   cron \
   git \
@@ -18,9 +16,6 @@ RUN apt-get update && apt-get install -y \
   vim \
   zip
 
-RUN apt-get -t stretch-backports install -y \
-  libsodium-dev
-
 RUN docker-php-ext-configure \
   gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
 
@@ -36,6 +31,11 @@ RUN docker-php-ext-install \
   xsl \
   zip
 
+RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list 
+
+RUN apt-get update && apt-get -t stretch-backports install -y \
+  libsodium-dev
+
 RUN pecl install -f libsodium-1.0.17 \
   && echo "extension=sodium.so" > /usr/local/etc/php/conf.d/sodium.ini
 

+ 7 - 6
images/php/7.2/Dockerfile

@@ -1,8 +1,6 @@
 FROM php:7.2-fpm
 MAINTAINER Mark Shust <mark@shust.com>
 
-RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
-
 RUN apt-get update && apt-get install -y \
   cron \
   git \
@@ -18,9 +16,6 @@ RUN apt-get update && apt-get install -y \
   vim \
   zip
 
-RUN apt-get -t stretch-backports install -y \
-  libsodium-dev
-
 RUN docker-php-ext-configure \
   gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
 
@@ -32,10 +27,16 @@ RUN docker-php-ext-install \
   opcache \
   pdo_mysql \
   soap \
-  sodium \
   xsl \
   zip
 
+RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list 
+
+RUN apt-get update && apt-get -t stretch-backports install -y \
+  libsodium-dev
+
+RUN pecl install -f libsodium-1.0.17
+
 RUN pecl channel-update pecl.php.net \
   && pecl install xdebug \
   && docker-php-ext-enable xdebug \