# PHP 7.2 == 3.9 # PHP 7.3 == 3.12 # PHP 7.4 == 3.15 ARG OS_VERSION=3.15 ARG PHP_VERSION=7.4 FROM quay.io/sindigilive/php:${PHP_VERSION}-builder-alpine AS builder ARG WITH_APACHE=false ARG WITH_DATABASE=false ENV WITH_APACHE=${WITH_APACHE} ENV WITH_DATABASE=${WITH_DATABASE} # Create directory, and install required php app RUN /bin/sh /tmp/setup.sh; \ /bin/rm -f /tmp/*.sh; \ rm -vrf /var/cache/apk/* FROM scratch ARG PHP_VERSION=7.4 ARG PHP_VER_SHORT=7 ENV PHP_VERSION=${PHP_VERSION} ENV PHP_VER_SHORT=${PHP_VER_SHORT} LABEL maintainer="Muhamad Aditya Prima " LABEL name="php" LABEL version="${PHP_VERSION}" LABEL distribution-scope="public" #labels for container catalog LABEL summary="PHP ${PHP_VERSION} on alpine based container image" LABEL description="Provide php on alpine based container base image" LABEL io.k8s.description="Very small alpine linux container image" LABEL io.k8s.display-name="PHP ${PHP_VERSION}" COPY --from=builder / / WORKDIR /app USER php STOPSIGNAL SIGQUIT CMD ["/usr/bin/php", "-v"]