diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..aebe66c166fea46a0cd4df88cbb817986207b269 --- /dev/null +++ b/php-fpm/Dockerfile @@ -0,0 +1,23 @@ +FROM bitnami/php-fpm:7.3.11-debian-9-r14 as development + +###### + +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +COPY sources.list /etc/apt/sources.list + +# Install required system packages and dependencies +RUN install_packages ca-certificates libbz2-1.0 libc6 libcomerr2 libcurl3 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmemcached11 libmemcachedutil2 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libssh2-1 libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 libzip4 zlib1g +RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && \ + sed -i 's/^PASS_MIN_DAYS.*/PASS_MIN_DAYS 0/' /etc/login.defs && \ + sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password + +COPY --from=development /opt/bitnami/common /opt/bitnami/common +COPY --from=development /opt/bitnami/php /opt/bitnami/php + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.3.11-debian-9-r14-prod" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/php/sbin:$PATH" + +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/.github/ISSUE_TEMPLATE.md b/php-fpm/bitnami-docker-php-fpm-master/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000000000000000000000000000000000..da2b4da33fdedb709a8079991b63b2d1f44b50a9 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,60 @@ + + +**Description** + + + +**Steps to reproduce the issue:** + +1. [First Step] +2. [Second Step] +3. [and so on...] + +**Describe the results you received:** + + + +**Describe the results you expected:** + + + +**Additional information you deem important (e.g. issue happens only occasionally):** + + + +**Version** + +- Output of `docker version`: + +``` +(paste your output here) +``` + +- Output of `docker info`: + +``` +(paste your output here) +``` + +- Output of `docker-compose version` (if applicable): + +``` +(paste your output here) +``` + +**Additional environment details (AWS, VirtualBox, Docker for MAC, physical, etc.):** diff --git a/php-fpm/bitnami-docker-php-fpm-master/.github/PULL_REQUEST_TEMPLATE.md b/php-fpm/bitnami-docker-php-fpm-master/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000000000000000000000000000000..c2acbe6e0d7016ccf24f0a6ce8b0c1b39160ad4a --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,32 @@ + + +**Description of the change** + + + +**Benefits** + + + +**Possible drawbacks** + + + +**Applicable issues** + + + +**Additional information** + + diff --git a/php-fpm/bitnami-docker-php-fpm-master/.github/stale.yml b/php-fpm/bitnami-docker-php-fpm-master/.github/stale.yml new file mode 100644 index 0000000000000000000000000000000000000000..ea65d3277a62a5c06949a61523fb7a6780f9413d --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/.github/stale.yml @@ -0,0 +1,36 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 15 + +# Number of days of inactivity before a stale Issue or Pull Request is closed. +daysUntilClose: 5 + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - on-hold + +# Label to use when marking as stale +staleLabel: stale + +issues: + # Comment to post when marking as stale. Set to `false` to disable + markComment: > + This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. + + # Comment to post when closing a stale Issue or Pull Request. + closeComment: > + Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. + +pulls: + # Comment to post when marking as stale. Set to `false` to disable + markComment: > + This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. + + # Comment to post when closing a stale Issue or Pull Request. + closeComment: > + Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary. + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/debian-9/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/debian-9/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..669781b0cd9c85622999572c1f2ec6245de396cc --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/debian-9/Dockerfile @@ -0,0 +1,21 @@ +FROM bitnami/php-fpm:7.1.33-debian-9-r14 as development + +###### + +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages ca-certificates libbz2-1.0 libc6 libcomerr2 libcurl3 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmcrypt4 libmemcached11 libmemcachedutil2 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libssh2-1 libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 zlib1g +RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && \ + sed -i 's/^PASS_MIN_DAYS.*/PASS_MIN_DAYS 0/' /etc/login.defs && \ + sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password + +COPY --from=development /opt/bitnami/common /opt/bitnami/common +COPY --from=development /opt/bitnami/php /opt/bitnami/php + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.1.33-debian-9-r13-prod" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/php/sbin:$PATH" + +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/debian-9/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/debian-9/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..799f4476e5d261ec03756dd32a1e1b0b7bd3ec3f --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/debian-9/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.1-prod' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/ol-7/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/ol-7/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a1e6e00ad77771f33411864b8ffd552cb6ccc1e1 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/ol-7/Dockerfile @@ -0,0 +1,18 @@ +FROM bitnami/php-fpm:7.1.33-ol-7-r20 as development + +###### + +FROM bitnami/oraclelinux-runtimes:7-r497 +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages bzip2-libs ca-certificates cyrus-sasl-lib freetds-libs freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmcrypt libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline wget xz-libs zlib + +COPY --from=development /opt/bitnami/common /opt/bitnami/common +COPY --from=development /opt/bitnami/php /opt/bitnami/php + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.1.33-ol-7-r19-prod" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/php/sbin:$PATH" + +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/ol-7/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/ol-7/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ab55972d6729457206326f57321334fa3227a705 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1-prod/ol-7/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.1-ol-7-prod' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1/debian-9/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.1/debian-9/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..fb2a3553dbd474bb5c9e112a46b833f70eaf2451 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1/debian-9/Dockerfile @@ -0,0 +1,21 @@ +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages ca-certificates libbz2-1.0 libc6 libcomerr2 libcurl3 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmcrypt4 libmemcached11 libmemcachedutil2 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libsqlite3-dev libssh2-1 libssl-dev libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 wget zlib1g +RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/php-7.1.33-0-linux-amd64-debian-9.tar.gz && \ + echo "35877d3ecf16f24b91403fd9fbe94a3d6a9715c5cb0d2dc5f29f505621e80d7e /tmp/bitnami/pkg/cache/php-7.1.33-0-linux-amd64-debian-9.tar.gz" | sha256sum -c - && \ + tar -zxf /tmp/bitnami/pkg/cache/php-7.1.33-0-linux-amd64-debian-9.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \ + rm -rf /tmp/bitnami/pkg/cache/php-7.1.33-0-linux-amd64-debian-9.tar.gz +RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && \ + sed -i 's/^PASS_MIN_DAYS.*/PASS_MIN_DAYS 0/' /etc/login.defs && \ + sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.1.33-debian-9-r14" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:$PATH" + +EXPOSE 9000 + +WORKDIR /app +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1/debian-9/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.1/debian-9/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..a50bf8a4c71355b7d4a6e4c4f7a671a02ff2830b --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1/debian-9/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.1' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1/ol-7/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.1/ol-7/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a7fe9db6e532c79ade1aff9c7d1d379c1c2cac76 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1/ol-7/Dockerfile @@ -0,0 +1,18 @@ +FROM bitnami/oraclelinux-runtimes:7-r497 +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages bzip2-libs ca-certificates cyrus-sasl-lib freetds-libs freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmcrypt libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline wget xz-libs zlib +RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/php-7.1.33-0-linux-x86_64-ol-7.tar.gz && \ + echo "f0d4060d152165ce210c3433b2fe98a9462fb5a5c64a855228986c217667c93c /tmp/bitnami/pkg/cache/php-7.1.33-0-linux-x86_64-ol-7.tar.gz" | sha256sum -c - && \ + tar -zxf /tmp/bitnami/pkg/cache/php-7.1.33-0-linux-x86_64-ol-7.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \ + rm -rf /tmp/bitnami/pkg/cache/php-7.1.33-0-linux-x86_64-ol-7.tar.gz + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.1.33-ol-7-r20" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:$PATH" + +EXPOSE 9000 + +WORKDIR /app +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.1/ol-7/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.1/ol-7/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..df24282a5a2bc8d38c78a8180887cf6fe27ce07c --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.1/ol-7/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.1-ol-7' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/debian-9/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/debian-9/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f06a96af60fd188d811531ef13ad27ac12edb20b --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/debian-9/Dockerfile @@ -0,0 +1,21 @@ +FROM bitnami/php-fpm:7.2.24-debian-9-r14 as development + +###### + +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages ca-certificates libbz2-1.0 libc6 libcomerr2 libcurl3 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmemcached11 libmemcachedutil2 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libssh2-1 libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 zlib1g +RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && \ + sed -i 's/^PASS_MIN_DAYS.*/PASS_MIN_DAYS 0/' /etc/login.defs && \ + sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password + +COPY --from=development /opt/bitnami/common /opt/bitnami/common +COPY --from=development /opt/bitnami/php /opt/bitnami/php + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.2.24-debian-9-r14-prod" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/php/sbin:$PATH" + +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/debian-9/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/debian-9/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d2a5e6ca21b20c8ba63f98a40ec60b757f06d34f --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/debian-9/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.2-prod' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/ol-7/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/ol-7/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..33a1cda64532297d9910cd8ee31846718cc387a1 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/ol-7/Dockerfile @@ -0,0 +1,18 @@ +FROM bitnami/php-fpm:7.2.24-ol-7-r19 as development + +###### + +FROM bitnami/oraclelinux-runtimes:7-r497 +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages bzip2-libs ca-certificates cyrus-sasl-lib freetds-libs freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline wget xz-libs zlib + +COPY --from=development /opt/bitnami/common /opt/bitnami/common +COPY --from=development /opt/bitnami/php /opt/bitnami/php + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.2.24-ol-7-r19-prod" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/php/sbin:$PATH" + +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/ol-7/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/ol-7/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c88f3439c8da5a57861f82abcc4d78e854713ee6 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2-prod/ol-7/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.2-ol-7-prod' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2/debian-9/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.2/debian-9/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..af3e67b74f8ae83dbc6f71bbc5dc5f81cf2aa0d0 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2/debian-9/Dockerfile @@ -0,0 +1,21 @@ +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages ca-certificates libbz2-1.0 libc6 libcomerr2 libcurl3 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmemcached11 libmemcachedutil2 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libsqlite3-dev libssh2-1 libssl-dev libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 wget zlib1g +RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/php-7.2.24-0-linux-amd64-debian-9.tar.gz && \ + echo "1b07c4047c4091aea0dbf93a36a7cbcedb84c6a57e65035fde48fa7ef7daafd3 /tmp/bitnami/pkg/cache/php-7.2.24-0-linux-amd64-debian-9.tar.gz" | sha256sum -c - && \ + tar -zxf /tmp/bitnami/pkg/cache/php-7.2.24-0-linux-amd64-debian-9.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \ + rm -rf /tmp/bitnami/pkg/cache/php-7.2.24-0-linux-amd64-debian-9.tar.gz +RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && \ + sed -i 's/^PASS_MIN_DAYS.*/PASS_MIN_DAYS 0/' /etc/login.defs && \ + sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.2.24-debian-9-r14" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:$PATH" + +EXPOSE 9000 + +WORKDIR /app +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2/debian-9/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.2/debian-9/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..2edd34a24d0308c8175cace91ae67a9f84ca589d --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2/debian-9/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.2' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2/ol-7/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.2/ol-7/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..94a92e250cf9e399c3c274ee83749b71c7d6faaf --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2/ol-7/Dockerfile @@ -0,0 +1,18 @@ +FROM bitnami/oraclelinux-runtimes:7-r497 +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages bzip2-libs ca-certificates cyrus-sasl-lib freetds-libs freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline wget xz-libs zlib +RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/php-7.2.24-0-linux-x86_64-ol-7.tar.gz && \ + echo "03e0363d640044e2810d88267bd345a51214d0d38a6bed9d00f0150f31856267 /tmp/bitnami/pkg/cache/php-7.2.24-0-linux-x86_64-ol-7.tar.gz" | sha256sum -c - && \ + tar -zxf /tmp/bitnami/pkg/cache/php-7.2.24-0-linux-x86_64-ol-7.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \ + rm -rf /tmp/bitnami/pkg/cache/php-7.2.24-0-linux-x86_64-ol-7.tar.gz + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.2.24-ol-7-r19" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:$PATH" + +EXPOSE 9000 + +WORKDIR /app +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.2/ol-7/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.2/ol-7/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5f4f13cf330934a3002aa683f8f222672a8dc2cc --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.2/ol-7/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.2-ol-7' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/debian-9/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/debian-9/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..08fd33374ad94488057ab06b98f2e7769c1808b9 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/debian-9/Dockerfile @@ -0,0 +1,21 @@ +FROM bitnami/php-fpm:7.3.11-debian-9-r14 as development + +###### + +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages ca-certificates libbz2-1.0 libc6 libcomerr2 libcurl3 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmemcached11 libmemcachedutil2 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libssh2-1 libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 libzip4 zlib1g +RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && \ + sed -i 's/^PASS_MIN_DAYS.*/PASS_MIN_DAYS 0/' /etc/login.defs && \ + sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password + +COPY --from=development /opt/bitnami/common /opt/bitnami/common +COPY --from=development /opt/bitnami/php /opt/bitnami/php + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.3.11-debian-9-r14-prod" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/php/sbin:$PATH" + +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/debian-9/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/debian-9/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..93ce8ee7ce4d8eb8d8082017492a332bc749aeb4 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/debian-9/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.3-prod' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/ol-7/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/ol-7/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f2bbd8ef78ddaabdc6660b1b6d755c6de13b0feb --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/ol-7/Dockerfile @@ -0,0 +1,18 @@ +FROM bitnami/php-fpm:7.3.11-ol-7-r19 as development + +###### + +FROM bitnami/oraclelinux-runtimes:7-r497 +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages bzip2-libs ca-certificates cyrus-sasl-lib freetds-libs freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline wget xz-libs zlib + +COPY --from=development /opt/bitnami/common /opt/bitnami/common +COPY --from=development /opt/bitnami/php /opt/bitnami/php + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.3.11-ol-7-r19-prod" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/php/sbin:$PATH" + +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/ol-7/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/ol-7/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..e4dd4bedba5cd4b9e113a5e54d3f4585ee6b28dc --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3-prod/ol-7/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.3-ol-7-prod' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3/debian-9/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.3/debian-9/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c5c5d0f62a79ec91b2b86aef828f1884d09edef4 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3/debian-9/Dockerfile @@ -0,0 +1,21 @@ +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages ca-certificates libbz2-1.0 libc6 libcomerr2 libcurl3 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmemcached11 libmemcachedutil2 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libsqlite3-dev libssh2-1 libssl-dev libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 libzip4 wget zlib1g +RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/php-7.3.11-0-linux-amd64-debian-9.tar.gz && \ + echo "65d3eb32f36d3017a4d729670cf0362108335e8af19f82ae4d6283db4cf4a73f /tmp/bitnami/pkg/cache/php-7.3.11-0-linux-amd64-debian-9.tar.gz" | sha256sum -c - && \ + tar -zxf /tmp/bitnami/pkg/cache/php-7.3.11-0-linux-amd64-debian-9.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \ + rm -rf /tmp/bitnami/pkg/cache/php-7.3.11-0-linux-amd64-debian-9.tar.gz +RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && \ + sed -i 's/^PASS_MIN_DAYS.*/PASS_MIN_DAYS 0/' /etc/login.defs && \ + sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.3.11-debian-9-r14" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:$PATH" + +EXPOSE 9000 + +WORKDIR /app +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3/debian-9/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.3/debian-9/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..f3119913985b4f68ceb0a57a3bd7fe87851c71a5 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3/debian-9/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.3' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3/ol-7/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/7.3/ol-7/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3a0c8fff34693729513320c9add9bb8e9c13980a --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3/ol-7/Dockerfile @@ -0,0 +1,18 @@ +FROM bitnami/oraclelinux-runtimes:7-r497 +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages bzip2-libs ca-certificates cyrus-sasl-lib freetds-libs freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline wget xz-libs zlib +RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/php-7.3.11-0-linux-x86_64-ol-7.tar.gz && \ + echo "88001699b01c3677a29c36a865db155d36d7cac6df0173934d43b952b3e0714a /tmp/bitnami/pkg/cache/php-7.3.11-0-linux-x86_64-ol-7.tar.gz" | sha256sum -c - && \ + tar -zxf /tmp/bitnami/pkg/cache/php-7.3.11-0-linux-x86_64-ol-7.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \ + rm -rf /tmp/bitnami/pkg/cache/php-7.3.11-0-linux-x86_64-ol-7.tar.gz + +ENV BITNAMI_APP_NAME="php-fpm" \ + BITNAMI_IMAGE_VERSION="7.3.11-ol-7-r19" \ + PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:$PATH" + +EXPOSE 9000 + +WORKDIR /app +CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ] diff --git a/php-fpm/bitnami-docker-php-fpm-master/7.3/ol-7/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/7.3/ol-7/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..737208dbcc6fd7faef2d65339fdfbe5d882207ce --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/7.3/ol-7/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.3-ol-7' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/LICENSE b/php-fpm/bitnami-docker-php-fpm-master/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5277333c95eb647fb7a587d20c93c78a05759b65 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015-2018 Bitnami + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/php-fpm/bitnami-docker-php-fpm-master/README.md b/php-fpm/bitnami-docker-php-fpm-master/README.md new file mode 100644 index 0000000000000000000000000000000000000000..67a3f80b7159b188258d9a10c952f5e0e0c211f8 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/README.md @@ -0,0 +1,433 @@ +# What is PHP-FPM? + +> PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. + +[php-fpm.org](http://php-fpm.org/) + +# TL;DR; + +```bash +$ docker run -it --name phpfpm -v /path/to/app:/app bitnami/php-fpm +``` + +## Docker Compose + +```bash +$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-php-fpm/master/docker-compose.yml > docker-compose.yml +$ docker-compose up -d +``` + +# Why use Bitnami Images? + +* Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems. +* With Bitnami images the latest bug fixes and features are available as soon as possible. +* Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs. +* All our images are based on [minideb](https://github.com/bitnami/minideb) a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading linux distribution. +* All Bitnami images available in Docker Hub are signed with [Docker Content Trust (DTC)](https://docs.docker.com/engine/security/trust/content_trust/). You can use `DOCKER_CONTENT_TRUST=1` to verify the integrity of the images. +* Bitnami container images are released daily with the latest distribution packages available. + + +> This [CVE scan report](https://quay.io/repository/bitnami/php-fpm?tab=tags) contains a security report with all open CVEs. To get the list of actionable security issues, find the "latest" tag, click the vulnerability report link under the corresponding "Security scan" field and then select the "Only show fixable" filter on the next page. + +# How to deploy PHP-FPM in Kubernetes? + +You can find an example for testing in the file `test.yaml`. To launch this sample file run: + +```bash +$ kubectl apply -f test.yaml +``` + +> NOTE: If you are pulling from a private containers registry, replace the image name with the full URL to the docker image. E.g. +> +> - image: 'your-registry/image-name:your-version' + +# Supported tags and respective `Dockerfile` links + +> NOTE: Debian 8 images have been deprecated in favor of Debian 9 images. Bitnami will not longer publish new Docker images based on Debian 8. + +Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/). + + +* [`7.3-ol-7-prod`, `7.3.11-ol-7-r19-prod` (7.3-prod/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.3.11-ol-7-r19-prod/7.3-prod/ol-7/Dockerfile) +* [`7.3-ol-7`, `7.3.11-ol-7-r19` (7.3/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.3.11-ol-7-r19/7.3/ol-7/Dockerfile) +* [`7.3-debian-9-prod`, `7.3.11-debian-9-r14-prod`, `7.3-prod`, `7.3.11-prod`, `7.3.11-r14-prod`, `latest-prod` (7.3-prod/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.3.11-debian-9-r14-prod/7.3-prod/debian-9/Dockerfile) +* [`7.3-debian-9`, `7.3.11-debian-9-r14`, `7.3`, `7.3.11`, `7.3.11-r14`, `latest` (7.3/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.3.11-debian-9-r14/7.3/debian-9/Dockerfile) +* [`7.2-ol-7-prod`, `7.2.24-ol-7-r19-prod` (7.2-prod/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.2.24-ol-7-r19-prod/7.2-prod/ol-7/Dockerfile) +* [`7.2-ol-7`, `7.2.24-ol-7-r19` (7.2/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.2.24-ol-7-r19/7.2/ol-7/Dockerfile) +* [`7.2-debian-9-prod`, `7.2.24-debian-9-r14-prod`, `7.2-prod`, `7.2.24-prod`, `7.2.24-r14-prod` (7.2-prod/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.2.24-debian-9-r14-prod/7.2-prod/debian-9/Dockerfile) +* [`7.2-debian-9`, `7.2.24-debian-9-r14`, `7.2`, `7.2.24`, `7.2.24-r14` (7.2/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.2.24-debian-9-r14/7.2/debian-9/Dockerfile) +* [`7.1-ol-7`, `7.1.33-ol-7-r20` (7.1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.1.33-ol-7-r20/7.1/ol-7/Dockerfile) +* [`7.1-ol-7-prod`, `7.1.33-ol-7-r19-prod` (7.1-prod/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.1.33-ol-7-r19-prod/7.1-prod/ol-7/Dockerfile) +* [`7.1-debian-9`, `7.1.33-debian-9-r14`, `7.1`, `7.1.33`, `7.1.33-r14` (7.1/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.1.33-debian-9-r14/7.1/debian-9/Dockerfile) +* [`7.1-debian-9-prod`, `7.1.33-debian-9-r13-prod`, `7.1-prod`, `7.1.33-prod`, `7.1.33-r13-prod` (7.1-prod/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-php-fpm/blob/7.1.33-debian-9-r13-prod/7.1-prod/debian-9/Dockerfile) + +Subscribe to project updates by watching the [bitnami/php-fpm GitHub repo](https://github.com/bitnami/bitnami-docker-php-fpm). + +# What are `prod` tagged containers for? + +Containers tagged `prod` are production containers based on [minideb](https://github.com/bitnami/minideb). They contain the minimal dependencies required by an application to work. + +They don't include development dependencies, so they are commonly used in multi-stage builds as the target image. Application code and dependencies should be copied from a different container. + +The resultant containers only contain the necessary pieces of software to run the application. Therefore, they are smaller and safer. + +Learn how to use multi-stage builds to build your production application container in the [example](/example) directory + +# Get this image + +The recommended way to get the Bitnami PHP-FPM Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/php-fpm). + +```bash +$ docker pull bitnami/php-fpm:latest +``` + +To use a specific version, you can pull a versioned tag. You can view the [list of available versions](https://hub.docker.com/r/bitnami/php-fpm/tags/) in the Docker Hub Registry. + +```bash +$ docker pull bitnami/php-fpm:[TAG] +``` + +If you wish, you can also build the image yourself. + +```bash +$ docker build -t bitnami/php-fpm 'https://github.com/bitnami/bitnami-docker-php-fpm.git#master:7.3/debian-9' +``` + +# Connecting to other containers + +This image is designed to be used with a web server to serve your PHP app, you can use docker networking to create a network and attach all the containers to that network. + +## Serving your PHP app through an nginx frontend + +We will use PHP-FPM with nginx to serve our PHP app. Doing so will allow us to setup more complex configuration, serve static assets using nginx, load balance to different PHP-FPM instances, etc. + +### Step 1: Create a network + +```bash +$ docker network create app-tier --driver bridge +``` + +or using Docker Compose: + +```yaml +version: '2' + +networks: + app-tier: + driver: bridge +``` + +### Step 2: Create a server block + +Let's create an nginx server block to reverse proxy to our PHP-FPM container. + +```nginx +server { + listen 0.0.0.0:80; + server_name myapp.com; + + root /app; + + location / { + try_files $uri $uri/index.php; + } + + location ~ \.php$ { + # fastcgi_pass [PHP_FPM_LINK_NAME]:9000; + fastcgi_pass phpfpm:9000; + fastcgi_index index.php; + include fastcgi.conf; + } +} +``` + +Notice we've substituted the link alias name `myapp`, we will use the same name when creating the container. + +Copy the server block above, saving the file somewhere on your host. We will mount it as a volume in our nginx container. + +### Step 3: Run the PHP-FPM image with a specific name + +Docker's linking system uses container ids or names to reference containers. We can explicitly specify a name for our PHP-FPM server to make it easier to connect to other containers. + +```bash +$ docker run -it --name phpfpm \ + --network app-tier + -v /path/to/app:/app \ + bitnami/php-fpm +``` + +or using Docker Compose: + +```yaml +services: + phpfpm: + image: 'bitnami/php-fpm:latest' + networks: + - app-tier + volumes: + - /path/to/app:/app +``` + +### Step 4: Run the nginx image + +```bash +$ docker run -it \ + -v /path/to/server_block.conf:/opt/bitnami/nginx/conf/server_blocks/yourapp.conf \ + --network app-tier \ + bitnami/nginx +``` + +or using Docker Compose: + +```yaml +services: + nginx: + image: 'bitnami/nginx:latest' + depends_on: + - phpfpm + networks: + - app-tier + ports: + - '80:80' + - '443:443' + volumes: + - /path/to/server_block.conf:/opt/bitnami/nginx/conf/server_blocks/yourapp.conf +``` + +# PHP runtime + +Since this image bundles a PHP runtime, you may want to make use of PHP outside of PHP-FPM. By default, running this image will start a server. To use the PHP runtime instead, we can override the the default command Docker runs by stating a different command to run after the image name. + +## Entering the REPL + +PHP provides a REPL where you can interactively test and try things out in PHP. + +```bash +$ docker run -it --name phpfpm bitnami/php-fpm php -a +``` + +**Further Reading:** + +- [PHP Interactive Shell Documentation](http://php.net/manual/en/features.commandline.interactive.php) + +# Running your PHP script + +The default work directory for the PHP-FPM image is `/app`. You can mount a folder from your host here that includes your PHP script, and run it normally using the `php` command. + +```bash +$ docker run -it --name php-fpm -v /path/to/app:/app bitnami/php-fpm \ + php script.php +``` + +# Configuration + +## Mount a custom config file + +You can mount a custom config file from your host to edit the default configuration for the php-fpm docker image. The following is an example to alter the configuration of the _php-fpm.conf_ configuration file: + +### Step 1: Run the PHP-FPM image + +Run the PHP-FPM image, mounting a file from your host. + +```bash +$ docker run --name phpfpm -v /path/to/php-fpm.conf:/opt/bitnami/php/etc/php-fpm.conf bitnami/php-fpm +``` + +or by modifying the [`docker-compose.yml`](https://github.com/bitnami/bitnami-docker-php-fpm/blob/master/docker-compose.yml) file present in this repository: + +```yaml +services: + phpfpm: + ... + volumes: + - /path/to/php-fpm.conf:/opt/bitnami/php/etc/php-fpm.conf + ... +``` + +### Step 2: Edit the configuration + +Edit the configuration on your host using your favorite editor. + +```bash +$ vi /path/to/php-fpm.conf +``` + +### Step 3: Restart PHP-FPM + +After changing the configuration, restart your PHP-FPM container for the changes to take effect. + +```bash +$ docker restart phpfpm +``` + +or using Docker Compose: + +```bash +$ docker-compose restart phpfpm +``` + +## Add additional .ini files + +PHP has been configured at compile time to scan the `/opt/bitnami/php/etc/conf.d/` folder for extra .ini configuration files so it is also possible to mount your customizations there. + +Multiple files are loaded in alphabetical order. It is common to have a file per extension and use a numeric prefix to guarantee an order loading the configuration. + +Please check [http://php.net/manual/en/configuration.file.php#configuration.file.scan](http://php.net/manual/en/configuration.file.php#configuration.file.scan) to know more about this feature. + +In order to override the default `max_file_uploads` settings you can do the following: + +1. Create a file called _custom.ini_ with the following content: + +``` +max_file_uploads = 30M +``` + +2. Run the php-fpm container mounting the custom file. + +```bash +$ docker run -it -v /path/to/custom.ini:/opt/bitnami/php/etc/conf.d/custom.ini bitnami/php-fpm php -i | grep max_file_uploads + +``` + +You should see that PHP is using the new specified value for the `max_file_uploads` setting. + +# Logging + +The Bitnami PHP-FPM Docker Image sends the container logs to the `stdout`. You can configure the containers [logging driver](https://docs.docker.com/engine/reference/run/#logging-drivers-log-driver) using the `--log-driver` option. By defauly the `json-file` driver is used. + +To view the logs: + +```bash +$ docker logs phpfpm +``` + +or using Docker Compose: + +```bash +$ docker-compose logs phpfpm +``` + +*The `docker logs` command is only available when the `json-file` or `journald` logging driver is in use.* + +# Maintenance + +## Upgrade this image + +Bitnami provides up-to-date versions of PHP-FPM, including security patches, soon after they are made upstream. We recommend that you follow these steps to upgrade your container. + +### Step 1: Get the updated image + +```bash +$ docker pull bitnami/php-fpm:latest +``` + +or if you're using Docker Compose, update the value of the image property to +`bitnami/php-fpm:latest`. + +### Step 2: Stop and backup the currently running container + +Stop the currently running container using the command + +```bash +$ docker stop php-fpm +``` + +or using Docker Compose: + +```bash +$ docker-compose stop php-fpm +``` + +Next, take a snapshot of the persistent volume `/path/to/php-fpm-persistence` using: + +```bash +$ rsync -a /path/to/php-fpm-persistence /path/to/php-fpm-persistence.bkp.$(date +%Y%m%d-%H.%M.%S) +``` + +You can use this snapshot to restore the database state should the upgrade fail. + +### Step 3: Remove the currently running container + +```bash +$ docker rm -v phpfpm +``` + +or using Docker Compose: + +```bash +$ docker-compose rm -v phpfpm +``` + +### Step 4: Run the new image + +Re-create your container from the new image. + +```bash +$ docker run --name phpfpm bitnami/php-fpm:latest +``` + +or using Docker Compose: + +```bash +$ docker-compose up phpfpm +``` + +# Useful Links + +- [Create An AMP Development Environment With Bitnami Containers +](https://docs.bitnami.com/containers/how-to/create-amp-environment-containers/) +- [Create An EMP Development Environment With Bitnami Containers +](https://docs.bitnami.com/containers/how-to/create-emp-environment-containers/) + +# Notable Changes + +## 7.2.3-r2, 7.1.15-r2, 7.0.28-r2 and 5.6.34-r2 (2018-03-13) + +- PHP has been configured at compile time to scan the `/opt/bitnami/php/etc/conf.d/` folder for extra .ini configuration files. + +## 7.0.6-r0 (2016-05-17) + +- All volumes have been merged at `/bitnami/php-fpm`. Now you only need to mount a single volume at `/bitnami/php-fpm` for persistence. +- The logs are always sent to the `stdout` and are no longer collected in the volume. + +## 5.5.30-2 (2015-12-07) + +- Enables support for imagick extension + +## 5.5.30-0-r01 (2015-11-10) + +- `php.ini` is now exposed in the volume mounted at `/bitnami/php-fpm/conf/` allowing users to change the defaults as per their requirements. + +## 5.5.30-0 (2015-10-06) + +- `/app` directory is no longer exported as a volume. This caused problems when building on top of the image, since changes in the volume are not persisted between Dockerfile `RUN` instructions. To keep the previous behavior (so that you can mount the volume in another container), create the container with the `-v /app` option. + +# Contributing + +We'd love for you to contribute to this Docker image. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-php-fpm/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-php-fpm/pulls) with your contribution. + +# Issues + +If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-php-fpm/issues). For us to provide better support, be sure to include the following information in your issue: + +- Host OS and version +- Docker version (`docker version`) +- Output of `docker info` +- Version of this container (`echo $BITNAMI_IMAGE_VERSION` inside the container) +- The command you used to run the container, and any relevant output you saw (masking any sensitive information) + +# License + +Copyright (c) 2015-2019 Bitnami + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/php-fpm/bitnami-docker-php-fpm-master/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..f3119913985b4f68ceb0a57a3bd7fe87851c71a5 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + php: + tty: true # Enables debugging capabilities when attached to this container. + image: 'bitnami/php-fpm:7.3' + ports: + - 9000:9000 + volumes: + - .:/app diff --git a/php-fpm/bitnami-docker-php-fpm-master/example/.dockerignore b/php-fpm/bitnami-docker-php-fpm-master/example/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..e753ca6a8bf93ffb87defa9511cde63932ccf1cd --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/example/.dockerignore @@ -0,0 +1,2 @@ +kubernetes.yml +README.md diff --git a/php-fpm/bitnami-docker-php-fpm-master/example/Dockerfile b/php-fpm/bitnami-docker-php-fpm-master/example/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..b6917b9c22bcb6251595e1ca04aaba63f270f94f --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/example/Dockerfile @@ -0,0 +1,10 @@ +FROM bitnami/php-fpm:7.1 as builder +COPY . /app +WORKDIR /app +# Optionally install application dependencies here. For example using composer. + +FROM bitnami/php-fpm:7.1-prod +COPY --from=builder /app /app +WORKDIR /app +EXPOSE 9000 +CMD ["php-fpm", "-F", "--pid" , "/opt/bitnami/php/tmp/php-fpm.pid", "-c", "/opt/bitnami/php/conf/php-fpm.conf"] diff --git a/php-fpm/bitnami-docker-php-fpm-master/example/README.md b/php-fpm/bitnami-docker-php-fpm-master/example/README.md new file mode 100644 index 0000000000000000000000000000000000000000..dba46d840e293f481e2012b01a5f9a1701daf128 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/example/README.md @@ -0,0 +1,152 @@ +# Example Application + +## TL;DR + +```bash +$ kubectl create -f https://raw.githubusercontent.com/bitnami/bitnami-docker-php-fpm/master/example/kubernetes.yml +``` + +## Introduction + +This example demostrates the use of the `bitnami/php-fpm` image to create a production build of your php application. + +For demonstration purposes we will create a phpinfo application, build a image with the tag `bitnami/php-example` and deploy it on a [Kubernetes](https://kubernetes.io) cluster. + +## Generate the application + +The example application is just the next snippet to show the phpinfo page. + +```php + +``` + +## Build and Test + +To build a production Docker image of our application we'll use the `bitnami/php-fpm:6-prod` image, which is a production build of the Bitnami PHP-FPM Image optimized for size. + +```dockerfile +FROM bitnami/php-fpm:7.1 as builder +COPY . /app +WORKDIR /app +# Optionally install application dependencies here. For example using composer. + +FROM bitnami/php-fpm:7.1-prod +COPY --from=builder /app /app +WORKDIR /app +EXPOSE 9000 +CMD ["php-fpm", "-F", "--pid" , "/opt/bitnami/php/tmp/php-fpm.pid", "-c", "/opt/bitnami/php/conf/php-fpm.conf"] +``` + +The `Dockerfile` consists of two build stages. The first stage uses the development image, `bitnami/php-fpm:7.1`, to copy the application source and install the required application dependencies if required. + +The second stage uses the production image, `bitnami/php-fpm:7.1-prod`, and copies over the application source and the dependencies from the previous stage. This creates a minimal Docker image that only consists of the application source and dependencies and the php runtime. + +> **Note** +> +> We don't need a multistage build for this specific example as the application does not have dependencies but it is done in this way to demostrate how should be used. + + +To build the Docker image, execute the command: + +```bash +$ docker build -t bitnami/php-example:0.0.1 example/ +``` + +Since the `bitnami/php-fpm:7.1-prod` image is optimized for production deployments it does not include any packages that would bloat the image. + +```console +$ docker image ls +REPOSITORY TAG IMAGE ID CREATED SIZE +bitnami/php-example 0.0.1 8c72c8c9a73e 32 minutes ago 202MB +``` + +You can now launch and test the image locally. We will need a web server like Nginx to server our php app with PHP-FPM. The following docker-compose file deploys both the php application and the nginx server mounting an already configured server block. + + +```yaml +version: '2' +services: + phpfpm: + image: 'bitnami/php-example:0.0.1' + nginx: + image: 'bitnami/nginx:latest' + depends_on: + - phpfpm + ports: + - '8080:8080' + - '8443:8443' + volumes: + - ./server_blocks/myapp.conf:/opt/bitnami/nginx/conf/server_blocks/myapp.conf +``` +You can start the deployment with this command: + +``` +$ docker-compose up +``` + +Finally you can access your application at http://your-ip:8080 + +## Deployment + +The `kubernetes.yml` file from the `example/` folder can be used to deploy our `bitnami/php-example:0.0.1` image to a Kubernetes cluster. + +Simply download the Kubernetes manifest and create the Kubernetes resources described in the manifest using the command: + +```console +$ kubectl create -f kubernetes.yml +ingress "example-ingress" created +service "example-svc" created +service "nginx-svc" created +configmap "example-configmap" created +persistentvolumeclaim "example-data-pvc" created +deployment "example-deployment" created +deployment "nginx-deployment" created +configmap "nginx-configmap" created +``` + +From the output of the above command you will notice that we create the following resources: + + - [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) + - [Service](https://kubernetes.io/docs/concepts/services-networking/service/) + - [Volume](https://kubernetes.io/docs/concepts/storage/volumes/) + + [ConfigMap](https://kubernetes.io/docs/concepts/storage/volumes/#projected) + + [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim) + - [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) + +> **Note** +> +> Our example application is stateless and does not store any data or does not require any user configurations. As such we do not need to create the `ConfigMap` or `PersistentVolumeClaim` resources. Our `kubernetes.yml` creates these resources strictly to demostrate how they are defined in the manifest. + +## Accessing the application + +Typically in production you would access the application via a Ingress controller. Our `kubernetes.yml` already defines a `Ingress` resource. Please refer to the [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) documentation to learn how to deploy an ingress controller in your cluster. + +> **Hint** +> +> https://kubeapps.com/charts/stable/nginx-ingress + +The following are alternate ways of accessing the application, typically used during application development and testing. + +Since the service `example-nginx` is defined to be of type `NodePort`, we can set up port forwarding to access our web application like so: + +```bash +$ kubectl port-forward $(kubectl get pods -l app=nginx -o jsonpath="{ .items[0].metadata.name }") 8080:8080 +``` + +The command forwards the local port `8080` to port `8080` of the Pod container. You can access the application by visiting the http://localhost:8080. + +> **Note:** +> +> If your using minikube, you can access the application by simply executing the following command: +> +> ```bash +> $ minikube service example-svc +> ``` + +## Health Checks + +The `kubernetes.yml` manifest defines default probes to check the health of the application. For our application we are simply probing if the application is responsive to queries on the root resource. + +You application can define a route, such as the commonly used `/healthz`, that reports the application status and use that route in the health probes. diff --git a/php-fpm/bitnami-docker-php-fpm-master/example/docker-compose.yml b/php-fpm/bitnami-docker-php-fpm-master/example/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..73f9b45d09451c44a27faf3a964a2438faeee736 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/example/docker-compose.yml @@ -0,0 +1,13 @@ +version: '2' +services: + phpfpm: + image: 'bitnami/php-example:0.0.1' + nginx: + image: 'bitnami/nginx:latest' + depends_on: + - phpfpm + ports: + - '8080:8080' + - '8443:8443' + volumes: + - ./server_blocks/myapp.conf:/opt/bitnami/nginx/conf/server_blocks/myapp.conf diff --git a/php-fpm/bitnami-docker-php-fpm-master/example/index.php b/php-fpm/bitnami-docker-php-fpm-master/example/index.php new file mode 100644 index 0000000000000000000000000000000000000000..968c8df7909f842e19469796df59fe6c5ba62740 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/example/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/php-fpm/bitnami-docker-php-fpm-master/example/kubernetes.yml b/php-fpm/bitnami-docker-php-fpm-master/example/kubernetes.yml new file mode 100644 index 0000000000000000000000000000000000000000..2bc848be1e8d28220b0dee9d7d3ae0579e6c248f --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/example/kubernetes.yml @@ -0,0 +1,182 @@ +apiVersion: v1 +items: +- apiVersion: extensions/v1beta1 + kind: Ingress + metadata: + name: example-ingress + labels: + app: example + annotations: + spec: + rules: + - host: app.example.com + http: + paths: + - path: / + backend: + serviceName: nginx-svc + servicePort: 80 + tls: +- apiVersion: v1 + kind: Service + metadata: + name: example-svc + labels: + app: example + spec: + ports: + - name: http + port: 9000 + targetPort: 9000 + selector: + app: example + status: + loadBalancer: {} +- apiVersion: v1 + kind: Service + metadata: + name: nginx-svc + labels: + app: nginx + spec: + ports: + - name: http + port: 80 + targetPort: http + selector: + app: nginx + type: NodePort + status: + loadBalancer: {} +- apiVersion: v1 + kind: ConfigMap + metadata: + name: example-configmap + labels: + app: example + data: + config.ini: |- +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: example-data-pvc + annotations: {} + labels: + app: example + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi + status: {} +- apiVersion: extensions/v1beta1 + kind: Deployment + metadata: + name: example-deployment + labels: + app: example + spec: + replicas: 1 + strategy: + type: Recreate + template: + metadata: + labels: + app: example + spec: + containers: + - name: example + image: bitnami/php-example:0.0.1 + ports: + - containerPort: 9000 + name: http + volumeMounts: + - mountPath: /app/config.ini + name: example-config + subPath: config.ini + - mountPath: /app/data + name: example-data + readinessProbe: + tcpSocket: + port: http + initialDelaySeconds: 10 + timeoutSeconds: 5 + restartPolicy: Always + volumes: + - name: example-config + configMap: + name: example-configmap + - name: example-data + persistentVolumeClaim: + claimName: example-data-pvc + status: {} +- apiVersion: extensions/v1beta1 + kind: Deployment + metadata: + name: nginx-deployment + labels: + app: nginx + spec: + replicas: 1 + strategy: + type: Recreate + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: bitnami/nginx:latest + ports: + - containerPort: 8080 + name: http + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 30 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 5 + timeoutSeconds: 1 + volumeMounts: + - name: nginx-server-blocks + mountPath: /bitnami/nginx/conf/server_blocks + volumes: + - name: nginx-server-blocks + configMap: + name: nginx-configmap + restartPolicy: Always + status: {} +- apiVersion: v1 + kind: ConfigMap + metadata: + name: nginx-configmap + labels: + app: nginx + data: + myapp.conf: |- + server { + listen 0.0.0.0:8080; + server_name myapp.com; + + root /app; + + location / { + try_files $uri $uri/index.php; + } + + location ~ \.php$ { + # fastcgi_pass example-svc:9000; + fastcgi_pass example-svc:9000; + fastcgi_index index.php; + include fastcgi.conf; + } + } +kind: List +metadata: {} diff --git a/php-fpm/bitnami-docker-php-fpm-master/example/server_blocks/myapp.conf b/php-fpm/bitnami-docker-php-fpm-master/example/server_blocks/myapp.conf new file mode 100644 index 0000000000000000000000000000000000000000..dbd475f74c7085787178c64a78f6cad633ec286b --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/example/server_blocks/myapp.conf @@ -0,0 +1,17 @@ +server { + listen 0.0.0.0:8080; + server_name myapp.com; + + root /app; + + location / { + try_files $uri $uri/index.php; + } + + location ~ \.php$ { + # fastcgi_pass [PHP_FPM_LINK_NAME]:9000; + fastcgi_pass phpfpm:9000; + fastcgi_index index.php; + include fastcgi.conf; + } +} \ No newline at end of file diff --git a/php-fpm/bitnami-docker-php-fpm-master/test.yaml b/php-fpm/bitnami-docker-php-fpm-master/test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9f0893b1cad094554d205692334af4b18fcf3579 --- /dev/null +++ b/php-fpm/bitnami-docker-php-fpm-master/test.yaml @@ -0,0 +1,22 @@ +## This is test deployment for Kubernetes platforms. +## This is _not_ intended to be use in producction. +## +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: test-php-fpm + name: test-php-fpm +spec: + replicas: 1 + selector: + matchLabels: + app: test-php-fpm + template: + metadata: + labels: + app: test-php-fpm + spec: + containers: + - image: bitnami/php-fpm + name: php-fpm diff --git a/php-fpm/sources.list b/php-fpm/sources.list new file mode 100644 index 0000000000000000000000000000000000000000..20f9a2bbbc6f336d56955d65829500a2f9b6fe76 --- /dev/null +++ b/php-fpm/sources.list @@ -0,0 +1,8 @@ +deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib +deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib +deb http://mirrors.aliyun.com/debian-security stretch/updates main +deb-src http://mirrors.aliyun.com/debian-security stretch/updates main +deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib +deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib +deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib +deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib diff --git a/php-nginx/Dockerfile b/php-nginx/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..99b6a435e37e380b3c0bf483e41c036a1d822625 --- /dev/null +++ b/php-nginx/Dockerfile @@ -0,0 +1,20 @@ +# +# Copyright (C) 2018 XueTong Tech Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM registry-vpc.cn-hangzhou.aliyuncs.com/schbrain/nginx:2.3.2_1 +MAINTAINER xt + +COPY nginx.conf /usr/local/nginx/conf/nginx.conf diff --git a/php-nginx/nginx.conf b/php-nginx/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..e08de352487f92ecd787a7991b4722c9d527a4da --- /dev/null +++ b/php-nginx/nginx.conf @@ -0,0 +1,66 @@ + +#user nobody; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + + +events { + worker_connections 1024; +} + +# load modules compiled as Dynamic Shared Object (DSO) +# +#dso { +# load ngx_http_fastcgi_module.so; +# load ngx_http_rewrite_module.so; +#} + +http { + include mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" $http_host ' + '$status $request_length $body_bytes_sent "$http_referer" ' + '"$http_user_agent" $request_time $upstream_response_time'; + + #access_log logs/access.log main; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + #gzip on; + + server { + listen 80 default; + + #charset koi8-r; + + #access_log logs/host.access.log main; + + location / { + root /app; + index index.php; + } + + location ~ \.php$ { + fastcgi_pass thinksns.jianlan:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /app/$fastcgi_script_name; + include fastcgi_params; + } + + location ~.*/*\.html$ { + root /var/app; + add_header Cache-Control "no-cache, no-store, max-age=0, must-revalidate"; + } + } +} +