Update PHP and add php.ini, change ssmtp to msmtp
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -3,14 +3,24 @@
|
||||
|
||||
FROM php:7.3-fpm
|
||||
|
||||
RUN apt-get update && apt-get install -y openssh-server ssmtp libpq-dev unzip git libssl1.0-dev libldap-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* \
|
||||
&& useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp \
|
||||
&& sed -i -e 's/^mailhub=mail$/mailhub=smtp/' -e "s/^hostname=/#hostname=/" -e 's/#FromLineOverride=YES/FromLineOverride=YES/' /etc/ssmtp/ssmtp.conf
|
||||
RUN apt-get update && apt-get install -y openssh-server libpq-dev unzip git libldap-dev \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp
|
||||
RUN sed -e 's/^expose_php = On/expose_php = Off/' /usr/local/etc/php/php.ini-production > /usr/local/etc/php/php.ini
|
||||
COPY sshd_config.patch /tmp
|
||||
RUN (cd / && patch -p0 ) < /tmp/sshd_config.patch && rm /tmp/sshd_config.patch
|
||||
|
||||
RUN apt-get update && apt-get install -y msmtp \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean \
|
||||
& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY msmtprc /etc/
|
||||
RUN sed -i -e 's#^;sendmail_path =#sendmail_path = "/usr/bin/msmtp -t"#' /usr/local/etc/php/php.ini
|
||||
|
||||
EXPOSE 9000/tcp 22/tcp
|
||||
|
||||
RUN docker-php-ext-install -j$(nproc) pdo_mysql pdo_pgsql ldap gettext
|
||||
|
Reference in New Issue
Block a user