From 0254cbad610028933c45d84ade948c6c17453aff Mon Sep 17 00:00:00 2001 From: Muhamad Aditya Prima Date: Mon, 16 Dec 2024 16:07:57 +0700 Subject: [PATCH] Updated php-cli for php5.6 alpine linux version --- 5/Dockerfile.cli-alpine | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 5/Dockerfile.cli-alpine diff --git a/5/Dockerfile.cli-alpine b/5/Dockerfile.cli-alpine new file mode 100644 index 0000000..0a4ab7e --- /dev/null +++ b/5/Dockerfile.cli-alpine @@ -0,0 +1,49 @@ +# PHP 5.6 == 3.5 +ARG ALPINE_VERSION=3.5 + +FROM quay.io/sindigilive/alpine:${ALPINE_VERSION} AS builder +LABEL maintainer=" map@sindigilive.com" + +ARG PHP_VERSION=5.6 +ARG PHP_SHORT_VER=5 +ENV PHP_VERSION=${PHP_VERSION} +ENV PHP_SHORT_VER=${PHP_SHORT_VER} + +WORKDIR /root + +# INSTALL PHP APP +RUN mkdir -p /app ; \ + apk add --update --no-cache \ + php${PHP_SHORT_VER} php${PHP_SHORT_VER}-common ; + +# CREATE SYMLINKS TO /usr/bin/php IN CASE IT IS NOT EXISTS +RUN ln -ns /usr/bin/php${PHP_SHORT_VER} /usr/bin/php ; exit 0 + +# CLEAN APK CACHES +RUN rm -vrf /var/cache/apk/* + +FROM scratch + +ARG PHP_VERSION=5.6 +ARG PHP_SHORT_VER=5 +ENV PHP_VERSION=${PHP_VERSION} +ENV PHP_SHORT_VER=${PHP_SHORT_VER} + +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 + +STOPSIGNAL SIGQUIT + +ENTRYPOINT ["/usr/bin/php", "-v"] \ No newline at end of file