mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-10 11:01:14 +00:00
Make RUN commands more strict
This commit is contained in:
@@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -43,7 +43,7 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -52,7 +52,7 @@ RUN set -x \
|
||||
###
|
||||
### Configure
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
|
||||
Reference in New Issue
Block a user