Newer
Older
LABEL authors="Nicolas Béjean <nicolas@bejean.fr>"
LABEL company="Béjean Développement"
LABEL website="www.bejean.eu"
LABEL version="1.0"
# Set timezone
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Change port and update user, owner and group
RUN sed -i \
-e 's/^user = www-data*/user = app/' \
-e 's/^group = www-data*/group = app/' \
-e 's/^;listen.owner = www-data*/listen.owner = app/' \
-e 's/^;listen.group = www-data*/listen.group = app/' \
/usr/local/etc/php-fpm.d/www.conf
# Create users, directories and update permissions
RUN addgroup -g 1000 app \
&& adduser -D -H -h /var/www/html -s /sbin/nologin -G app -u 1000 app \
&& mkdir -p /var/www/html /sock /var/log/php \
&& chown -R app:app /var/www/html /usr/local/etc /sock /var/log/php