thecodingmachine / docker-images-php

A set of PHP Docker images
MIT License
791 stars 140 forks source link

8.0-v4-slim-fpm: Syntax error: "&&" unexpected #318

Closed qwyk closed 2 years ago

qwyk commented 2 years ago

Hi,

Running a build with 8.0-v4-slim-fpm currenly fails with a syntax error on the INSTALL_CRON portion.

Current Behavior

Build fails with Syntax error: "&&" unexpected

/bin/sh: 1: Syntax error: "&&" unexpected
The command '/bin/sh -c if [ -n "$INSTALL_CRON" ]; then  SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-$TARGETOS-$TARGETARCH  && echo $SUPERCRONIC_URL  && SUPERCRONIC=supercronic-linux-${TARGETARCH}  && 
SUPERCRONIC_SHA1SUM=5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85  && if [ "$TARGETARCH" == "arm64" ]; then 
SUPERCRONIC_SHA1SUM=e2714c43e7781bf1579c85aa61259245f56dbba1;  && elif [ "$TARGETARCH" == "amd64" ]; then 
SUPERCRONIC_SHA1SUM=5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85;  && else echo "Target arch '$TARGETARCH' is not supported"; fi; 
 && curl -fsSLO "$SUPERCRONIC_URL"  && echo "${SUPERCRONIC_SHA1SUM}  ${SUPERCRONIC}" | sha1sum -c -  && chmod +x "$SUPERCRONIC"  && sudo mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}"  && sudo ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic;  fi;' returned a non-zero code: 2
bastnic commented 2 years ago

Same issue since the patch on the last release https://github.com/thecodingmachine/docker-images-php/runs/8091397792?check_suite_focus=true

ERROR: failed to solve: process "/bin/sh -c if [ -n \"$INSTALL_CRON\" ]; then  SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-$TARGETOS-$TARGETARCH  && echo $SUPERCRONIC_URL  && SUPERCRONIC=supercronic-linux-${TARGETARCH}  && SUPERCRONIC_SHA1SUM=5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85  && if [ \"$TARGETARCH\" == \"arm64\" ]; then SUPERCRONIC_SHA1SUM=e2714c43e7781bf1579c85aa61259245f56dbba1;     elif [ \"$TARGETARCH\" == \"amd64\" ]; then SUPERCRONIC_SHA1SUM=5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85;     else echo \"Target arch '$TARGETARCH' is not supported\"; fi;  && curl -fsSLO \"$SUPERCRONIC_URL\"  && echo \"${SUPERCRONIC_SHA1SUM}  ${SUPERCRONIC}\" | sha1sum -c -  && chmod +x \"$SUPERCRONIC\"  && sudo mv \"$SUPERCRONIC\" \"/usr/local/bin/${SUPERCRONIC}\"  && sudo ln -s \"/usr/local/bin/${SUPERCRONIC}\" /usr/local/bin/supercronic;  fi;" did not complete successfully: exit code: 2