Skip to content

Commit

Permalink
feat/base-php: add install-php-extensions script
Browse files Browse the repository at this point in the history
  • Loading branch information
chrootlogin committed Oct 24, 2024
1 parent 0671a50 commit d36bff4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion base-php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ FROM php:${PHP_VERSION}-fpm-${DEBIAN_VERSION}

# renovate: datasource=github-releases depName=aptible/supercronic versioning=semver
ARG SUPERCRONIC_VERSION="v0.2.33"
# renovate: datasource=github-releases depName=mlocati/docker-php-extension-installer versioning=semver
ARG INSTALL_PHP_EXTENSIONS_VERSION="2.6.0"

# sha1sums for supercronic
# sha1sums
ARG SUPERCRONIC_AMD64_SHA1SUM=71b0d58cc53f6bd72cf2f293e09e294b79c666d8
ARG SUPERCRONIC_386_SHA1SUM=37c4c0b42c4b00be123d2f9736754bcf0659ae4e
ARG SUPERCRONIC_ARM_SHA1SUM=0d3e3da1eeceaa34991d44b48aecfcbb9d9fba5a
ARG SUPERCRONIC_ARM64_SHA1SUM=e0f0c06ebc5627e43b25475711e694450489ab00
ARG INSTALL_PHP_EXTENSIONS_SHA1SUM=32d4b2cd2a5008d57d038670356121bc476f814b

# build variables
ARG TARGETARCH
Expand All @@ -31,6 +34,10 @@ RUN set -eux; \
[ "$TARGETARCH" = "arm" ] && SUPERCRONIC_SHA1SUM="$SUPERCRONIC_ARM_SHA1SUM"; \
[ "$TARGETARCH" = "arm64" ] && SUPERCRONIC_SHA1SUM="$SUPERCRONIC_ARM64_SHA1SUM"; \
CHECKSUM_STAGE=$(echo -n $(echo "${SUPERCRONIC_SHA1SUM} /usr/local/bin/supercronic" | sha1sum -c -) | tail -c 2); \
if [ "${CHECKSUM_STAGE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi; \
curl -fLo "/usr/local/bin/install-php-extensions" "https://github.com/mlocati/docker-php-extension-installer/releases/download/${INSTALL_PHP_EXTENSIONS_VERSION}/install-php-extensions"; \
chmod +x "/usr/local/bin/install-php-extensions"; \
CHECKSUM_STAGE=$(echo -n $(echo "${INSTALL_PHP_EXTENSIONS_SHA1SUM} /usr/local/bin/install-php-extensions" | sha1sum -c -) | tail -c 2); \
if [ "${CHECKSUM_STAGE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi

LABEL org.opencontainers.image.source="https://github.com/erhardtconsulting/images"
Expand Down

0 comments on commit d36bff4

Please sign in to comment.