This repository has been archived on 2024-09-11. You can view files and clone it, but cannot push or open issues or pull requests.
php-fpm-s6/Dockerfile.alpine

43 lines
1.0 KiB
Docker

# PHP 5.6 == 3.5
# PHP 7.2 == 3.9
# PHP 7.3 == 3.10
# PHP 7.4 == 3.13
# PHP 8 == 3.16
# PHP 8.1 == 3.18
# PHP 8.2 == 3.18
# PHP 8.3 == 3.19
ARG REGISTRY_URL=git.winteraccess.id/docker
ARG ALPINE_VERSION=3.19
FROM ${REGISTRY_URL}/alpine-s6:${ALPINE_VERSION}
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
ARG PHP_VERSION=83
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_FPM_BIN=php-fpm${PHP_VERSION}
WORKDIR /root
# INSTALL PHP APP
RUN --mount=type=cache,target=/var/cache/apk \
apk add --update \
php${PHP_VERSION} php${PHP_VERSION}-fpm
# REMOVE CURRENT POOL FIRST
RUN rm -rf /etc/php${PHP_VERSION}/php-fpm*
# COPY CONFIGURATION FILES
RUN mkdir -p /etc/php/fpm
ADD ./etc/php /etc/php
ADD ./etc/services.d/php-fpm-alpine /etc/services.d/php-fpm
# CREATE SYMLINKS TO /usr/bin/php IN CASE IT IS NOT EXISTS
RUN ln -ns /usr/bin/php${PHP_VERSION} /usr/bin/php; exit 0
# CHANGE USER PERMISSION ON /etc/services.d
RUN chmod -R +x /etc/services.d/php-fpm/*
# CLEAN APK CACHES
RUN rm -vrf /var/cache/apk/*
EXPOSE 9000