improved php using current user instead of root, improved timeout limit

This commit is contained in:
2019-11-06 12:46:11 +01:00
parent ceaf3963b0
commit 5eb02ec37b
9 changed files with 121 additions and 21 deletions

View File

@@ -45,5 +45,26 @@ COPY ./rsyslog-drupal.conf /etc/rsyslog.d/drupal.conf
COPY ./php-custom.ini /usr/local/etc/php/conf.d/php-custom.ini
# COPY ./php-fpm-custom.conf /usr/local/etc/php-fpm.d/php-fpm-custom.conf
COPY ./bashrc /root/.bashrc
COPY ./inputrc /root/.inputrc
# COPY ./bashrc /root/.bashrc
# COPY ./inputrc /root/.inputrc
ARG USER_UID
ARG USER_UNAME
ARG USER_GID
ARG USER_GNAME
RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi &&\
groupadd -g ${USER_GID} ${USER_GNAME} &&\
useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME} &&\
install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME} &&\
chown --changes --silent --no-dereference --recursive \
--from=33:33 ${USER_UID}:${USER_GID} \
/home/${USER_UNAME}
# /.composer \
# /var/run/php-fpm \
# /var/lib/php/sessions \
COPY ./bashrc /home/${USER_UNAME}/.bashrc
COPY ./inputrc /home/${USER_UNAME}/.inputrc
USER ${USER_UNAME}