[Dockerfile] Clean up apt cache, make image smaller (#1880)

This commit is contained in:
Peter Dave Hello 2020-11-29 18:18:20 +08:00 committed by GitHub
parent 1e75f9d3d5
commit be9df41e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,7 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& apt-get --yes --no-install-recommends install \ && apt-get --yes --no-install-recommends install \
zlib1g-dev \ zlib1g-dev \
libmemcached-dev \ libmemcached-dev \
&& rm -rf /var/lib/apt/lists/* \
&& pecl install memcached \ && pecl install memcached \
&& docker-php-ext-enable memcached \ && docker-php-ext-enable memcached \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \ && sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \