thecodingmachine / docker-images-php

A set of PHP Docker images
MIT License
785 stars 138 forks source link

Slim images now require `$TARGETOS` and `$TARGETARCH` args #319

Closed homersimpsons closed 2 years ago

homersimpsons commented 2 years ago

Expected Behavior

The following command should execute without any issues:

echo "FROM thecodingmachine/php:8.0-v4-slim-apache" | docker build --build-arg INSTALL_CRON=1 -t test -

Current Behavior

This currently fails with the following output:

 ---> Running in 92e640fb8384
https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic--
curl: (22) The requested URL returned error: 404 
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  && curl -fsSLO "$SUPERCRONIC_URL"  && 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: 22

Possible Solution

For the moment, one has to define $TARGETOS and $TARGETARCH.

They could be set to the previous default in order to keep the same behavior.

Another option would be to detect the current architecture, I do not know if this is feasible though.

Steps to Reproduce (for bugs)

  1. Run echo "FROM thecodingmachine/php:8.0-v4-slim-apache" | docker build --build-arg INSTALL_CRON=1 -t test -

Context

Current images Id is sha256:aeaa3e010dc9fa1a3d617325db5e94d1524152c8cb44af7bbb35311f853fa575

Your Environment