diff --git a/Dockerfile b/Dockerfile index 867b807..29362c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ RUN --mount=type=bind,from=cosign-bin,source=/ko-app/cosign,target=/usr/local/bi unzip && \ echo "**** configure php-fpm to pass env vars ****" && \ sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php84/php-fpm.d/www.conf && \ - grep -qxF 'clear_env = no' /etc/php84/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php84/php-fpm.d/www.conf && \ + if ! grep -qxF 'clear_env = no' /etc/php84/php-fpm.d/www.conf; then echo 'clear_env = no' >> /etc/php84/php-fpm.d/www.conf; fi && \ echo "**** install lychee ****" && \ if [ -z "${LYCHEE_VERSION}" ]; then \ LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index cddf373..2af4917 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -40,7 +40,7 @@ RUN --mount=type=bind,from=cosign-bin,source=/ko-app/cosign,target=/usr/local/bi unzip && \ echo "**** configure php-fpm to pass env vars ****" && \ sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php84/php-fpm.d/www.conf && \ - grep -qxF 'clear_env = no' /etc/php84/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php84/php-fpm.d/www.conf && \ + if ! grep -qxF 'clear_env = no' /etc/php84/php-fpm.d/www.conf; then echo 'clear_env = no' >> /etc/php84/php-fpm.d/www.conf; fi && \ echo "**** install lychee ****" && \ if [ -z "${LYCHEE_VERSION}" ]; then \ LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \