Skip to content

Commit e2fe207

Browse files
Merge pull request #258 from magento/1.1-fwd
Forward-port 1.1 into develop
2 parents 39aecf8 + aa9e4ad commit e2fe207

33 files changed

+242
-108
lines changed

images/php/7.2-cli/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ENV DEBUG false
99
ENV MAGENTO_RUN_MODE production
1010
ENV UPDATE_UID_GID false
1111
ENV COMPOSER_ALLOW_SUPERUSER 1
12+
ENV ENABLE_SENDMAIL true
1213

1314
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sysvmsg sysvsem sysvshm xsl zip pcntl
1415

@@ -28,8 +29,6 @@ RUN apt-get update \
2829
python3 \
2930
python3-pip \
3031
redis-tools \
31-
sendmail \
32-
sendmail-bin \
3332
sudo \
3433
unzip \
3534
vim \
@@ -67,6 +66,11 @@ RUN pip3 install --upgrade setuptools \
6766
# Install Grunt
6867
RUN npm install -g grunt-cli
6968

69+
# Install MailHog
70+
RUN wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
71+
&& sudo chmod +x mhsendmail_linux_amd64 \
72+
&& sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
73+
7074
# Configure the gd library
7175
RUN docker-php-ext-configure \
7276
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

images/php/7.2-cli/docker-entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ PHP_EXT_DIR=/usr/local/etc/php/conf.d
4242

4343
# Configure Sendmail if required
4444
if [ "$ENABLE_SENDMAIL" == "true" ]; then
45-
sed -i "s/!SENDMAIL_PATH!/\/usr\/sbin\/sendmail -t -i/" ${PHP_EXT_DIR}/zz-mail.ini
46-
/etc/init.d/sendmail start
45+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
4746
else
4847
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
4948
fi

images/php/7.2-fpm/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ENV DEBUG false
88
ENV MAGENTO_RUN_MODE production
99
ENV UPLOAD_MAX_FILESIZE 64M
1010
ENV UPDATE_UID_GID false
11+
ENV ENABLE_SENDMAIL true
1112

1213
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sysvmsg sysvsem sysvshm xsl zip pcntl
1314

@@ -16,8 +17,6 @@ RUN apt-get update \
1617
&& apt-get upgrade -y \
1718
&& apt-get install -y --no-install-recommends \
1819
apt-utils \
19-
sendmail-bin \
20-
sendmail \
2120
sudo \
2221
libbz2-dev \
2322
libjpeg62-turbo-dev \
@@ -45,6 +44,11 @@ RUN apt-get update \
4544
zip \
4645
&& rm -rf /var/lib/apt/lists/*
4746

47+
# Install MailHog
48+
RUN wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
49+
&& sudo chmod +x mhsendmail_linux_amd64 \
50+
&& sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
51+
4852
# Configure the gd library
4953
RUN docker-php-ext-configure \
5054
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

images/php/7.2-fpm/docker-entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ PHP_EXT_DIR=/usr/local/etc/php/conf.d
3434

3535
# Configure Sendmail if required
3636
if [ "$ENABLE_SENDMAIL" == "true" ]; then
37-
sed -i "s/!SENDMAIL_PATH!/\/usr\/sbin\/sendmail -t -i/" ${PHP_EXT_DIR}/zz-mail.ini
38-
/etc/init.d/sendmail start
37+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
3938
else
4039
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
4140
fi

images/php/7.3-cli/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ENV DEBUG false
99
ENV MAGENTO_RUN_MODE production
1010
ENV UPDATE_UID_GID false
1111
ENV COMPOSER_ALLOW_SUPERUSER 1
12+
ENV ENABLE_SENDMAIL true
1213

1314
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sysvmsg sysvsem sysvshm xsl zip pcntl
1415

@@ -28,8 +29,6 @@ RUN apt-get update \
2829
python3 \
2930
python3-pip \
3031
redis-tools \
31-
sendmail \
32-
sendmail-bin \
3332
sudo \
3433
unzip \
3534
vim \
@@ -65,6 +64,11 @@ RUN pip3 install --upgrade setuptools \
6564
# Install Grunt
6665
RUN npm install -g grunt-cli
6766

67+
# Install MailHog
68+
RUN wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
69+
&& sudo chmod +x mhsendmail_linux_amd64 \
70+
&& sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
71+
6872
# Configure the gd library
6973
RUN docker-php-ext-configure \
7074
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

images/php/7.3-cli/docker-entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ PHP_EXT_DIR=/usr/local/etc/php/conf.d
4242

4343
# Configure Sendmail if required
4444
if [ "$ENABLE_SENDMAIL" == "true" ]; then
45-
sed -i "s/!SENDMAIL_PATH!/\/usr\/sbin\/sendmail -t -i/" ${PHP_EXT_DIR}/zz-mail.ini
46-
/etc/init.d/sendmail start
45+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
4746
else
4847
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
4948
fi

images/php/7.3-fpm/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ENV DEBUG false
88
ENV MAGENTO_RUN_MODE production
99
ENV UPLOAD_MAX_FILESIZE 64M
1010
ENV UPDATE_UID_GID false
11+
ENV ENABLE_SENDMAIL true
1112

1213
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sysvmsg sysvsem sysvshm xsl zip pcntl
1314

@@ -16,8 +17,6 @@ RUN apt-get update \
1617
&& apt-get upgrade -y \
1718
&& apt-get install -y --no-install-recommends \
1819
apt-utils \
19-
sendmail-bin \
20-
sendmail \
2120
sudo \
2221
libbz2-dev \
2322
libjpeg62-turbo-dev \
@@ -43,6 +42,11 @@ RUN apt-get update \
4342
zip \
4443
&& rm -rf /var/lib/apt/lists/*
4544

45+
# Install MailHog
46+
RUN wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
47+
&& sudo chmod +x mhsendmail_linux_amd64 \
48+
&& sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
49+
4650
# Configure the gd library
4751
RUN docker-php-ext-configure \
4852
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

images/php/7.3-fpm/docker-entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ PHP_EXT_DIR=/usr/local/etc/php/conf.d
3434

3535
# Configure Sendmail if required
3636
if [ "$ENABLE_SENDMAIL" == "true" ]; then
37-
sed -i "s/!SENDMAIL_PATH!/\/usr\/sbin\/sendmail -t -i/" ${PHP_EXT_DIR}/zz-mail.ini
38-
/etc/init.d/sendmail start
37+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
3938
else
4039
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
4140
fi

images/php/7.4-cli/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ENV DEBUG false
99
ENV MAGENTO_RUN_MODE production
1010
ENV UPDATE_UID_GID false
1111
ENV COMPOSER_ALLOW_SUPERUSER 1
12+
ENV ENABLE_SENDMAIL true
1213

1314
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sysvmsg sysvsem sysvshm xsl zip pcntl
1415

@@ -28,8 +29,6 @@ RUN apt-get update \
2829
python3 \
2930
python3-pip \
3031
redis-tools \
31-
sendmail \
32-
sendmail-bin \
3332
sudo \
3433
unzip \
3534
vim \
@@ -61,6 +60,11 @@ RUN pip3 install --upgrade setuptools \
6160
# Install Grunt
6261
RUN npm install -g grunt-cli
6362

63+
# Install MailHog
64+
RUN wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
65+
&& sudo chmod +x mhsendmail_linux_amd64 \
66+
&& sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
67+
6468
# Configure the gd library
6569
RUN docker-php-ext-configure \
6670
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/

images/php/7.4-cli/docker-entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ PHP_EXT_DIR=/usr/local/etc/php/conf.d
4242

4343
# Configure Sendmail if required
4444
if [ "$ENABLE_SENDMAIL" == "true" ]; then
45-
sed -i "s/!SENDMAIL_PATH!/\/usr\/sbin\/sendmail -t -i/" ${PHP_EXT_DIR}/zz-mail.ini
46-
/etc/init.d/sendmail start
45+
sed -i "s/!SENDMAIL_PATH!/\"\/usr\/local\/bin\/mhsendmail --smtp-addr=mailhog:1025\"/" ${PHP_EXT_DIR}/zz-mail.ini
4746
else
4847
sed -i "s/!SENDMAIL_PATH!/\"true > \/dev\/null\"/" ${PHP_EXT_DIR}/zz-mail.ini
4948
fi

0 commit comments

Comments
 (0)