Skip to content

Commit

Permalink
feat(docker): drastically lower final docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
damienwebdev committed Jul 4, 2019
1 parent 088c667 commit a8b07e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion php/7.2/alpine-develop/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM graycore/magento-php:7.2-fpm-alpine

MAINTAINER Damien Retzinger <damien@graycore.io>
LABEL maintainer="damien@graycore.io"

# Blackfire
ENV current_os=alpine
Expand Down
14 changes: 5 additions & 9 deletions php/7.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM php:7.2-fpm-alpine

MAINTAINER Damien Retzinger <damien@graycore.io>
LABEL maintainer="damien@graycore.io"

RUN apk update && apk add \
RUN apk add --no-cache \
gzip \
freetype-dev \
icu-dev \
Expand All @@ -13,21 +13,17 @@ RUN apk update && apk add \
curl-dev \
libsodium-dev \
mysql-client \
vim \
zip

RUN docker-php-ext-configure \
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

# https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html#required-php-extensions
RUN docker-php-ext-install \
# This layer must be run as one, not two - See: https://github.com/docker-library/php/issues/855
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install \
bcmath \
gd \
hash \
intl \
opcache \
pdo_mysql \
simplexml \
soap \
xsl \
zip
Expand Down

0 comments on commit a8b07e6

Please sign in to comment.