diff --git a/.git-config/hooks/pre-build b/.git-config/hooks/pre-build new file mode 100755 index 00000000..6c39058b --- /dev/null +++ b/.git-config/hooks/pre-build @@ -0,0 +1,30 @@ +#!/bin/sh + +BASE_DIR="$(git rev-parse --show-toplevel)" +BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" +BUILD_DESC= +VCS_REF="$(git rev-parse HEAD)" + +prebuild () { + local source + local dockerfile + source="$BASE_DIR/$1" + dockerfile=${source}/Dockerfile + readmefile=${source}/README.md + + if [ -f $readmefile ]; then + echo "\n\n$(cat ${BASE_DIR}/SPONSOR.md)" >>$readmefile + BUILD_DESC="$(sed '3q;d' $readmefile)" + fi + + if [ -f $dockerfile ]; then + echo "\n\n$(cat ${BASE_DIR}/src/Metafile)" >>$dockerfile + fi + + echo "::set-output name=BUILD_DATE::${BUILD_DATE}" + echo "::set-output name=BUILD_DESC::${BUILD_DESC}" + echo "::set-output name=VCS_REF::${VCS_REF}" +} + +mkdir -p /tmp/buildx 2>/dev/null +prebuild $1 \ No newline at end of file diff --git a/.github/workflows/publish-images.yml b/.github/workflows/publish-images.yml index 7fb10878..2b7d4135 100644 --- a/.github/workflows/publish-images.yml +++ b/.github/workflows/publish-images.yml @@ -47,15 +47,16 @@ jobs: - id: config run: | - echo -e "\n\n$(cat ./SPONSOR.md)" >>./src/base-s6/README.md - echo "::set-output name=date::$(date +'%Y%m%d')" - echo "::set-output name=description::$(sed '3q;d' ./src/base-s6/README.md)" - echo "::set-output name=s6_version::$(cat ./S6_VERSION.txt)" + ./.git-config/hooks/pre-commit + ./.git-config/hooks/pre-build src/base-s6 + echo "::set-output name=BUILD_NAME::${{ matrix.image }}" + echo "::set-output name=BUILD_VERSION::$(cat ./S6_VERSION.txt)" + echo "::set-output name=S6_VERSION::$(cat ./S6_VERSION.txt)" - uses: actions/cache@v2 with: path: /tmp/buildx - key: ${{ runner.os }}-buildx-${{ steps.config.outputs.s6_version }} + key: ${{ runner.os }}-buildx-${{ steps.config.outputs.S6_VERSION }} restore-keys: "${{ runner.os }}-buildx-" - uses: docker/login-action@v1 @@ -63,7 +64,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Building ${{ matrix.image }}:${{ steps.config.outputs.s6_version }} + name: Building ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} uses: docker/build-push-action@v2 with: push: true @@ -72,19 +73,23 @@ jobs: context: ./src/base-s6/ platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x build-args: | - BUILD_NUMBER=${{ steps.config.outputs.date }}-${{ steps.config.outputs.s6_version }} - S6_VERSION=${{ steps.config.outputs.s6_version }} + BUILD_NAME=${{ steps.config.outputs.BUILD_NAME }} + BUILD_VERSION=${{ steps.config.outputs.BUILD_VERSION }} + BUILD_DESC=${{ steps.config.outputs.BUILD_DESC }} + BUILD_DATE=${{ steps.config.outputs.BUILD_DATE }} + VCS_REF=${{ steps.config.outputs.VCS_REF }} + S6_VERSION=${{ steps.config.outputs.S6_VERSION }} tags: | - ${{ matrix.image }}:${{ steps.config.outputs.s6_version }} - ${{ matrix.image }}:latest + ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.S6_VERSION }} + ${{ steps.config.outputs.BUILD_NAME }}:latest - - name: Updating ${{ matrix.image }}/README.md + name: Updating ${{ steps.config.outputs.BUILD_NAME }}/README.md uses: peter-evans/dockerhub-description@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - repository: ${{ matrix.image }} - short-description: '${{ steps.config.outputs.description }}' + repository: ${{ steps.config.outputs.BUILD_NAME }} + short-description: '${{ steps.config.outputs.BUILD_DESC }}' readme-filepath: ./src/base-s6/README.md ############################################################################## @@ -114,12 +119,11 @@ jobs: id: config run: | ./.git-config/hooks/pre-commit - mkdir -p /tmp/buildx + ./.git-config/hooks/pre-build src/base-ubuntu cat versions/base.txt - echo -e "\n\n$(cat ./SPONSOR.md)" >>./src/base-ubuntu/README.md - echo "::set-output name=date::$(date +'%Y%m%d')" - echo "::set-output name=description::$(sed '3q;d' ./src/base-ubuntu/README.md)" - echo "::set-output name=s6_version::$(cat ./S6_VERSION.txt)" + echo "::set-output name=BUILD_NAME::${{ matrix.image }}" + echo "::set-output name=BUILD_VERSION::${{ matrix.version }}-s6-$(cat ./S6_VERSION.txt)" + echo "::set-output name=S6_VERSION::$(cat ./S6_VERSION.txt)" - uses: actions/cache@v2 with: @@ -133,31 +137,35 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Building ${{ matrix.image }}:${{ matrix.version }} + name: Building ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} uses: docker/build-push-action@v2 with: push: true cache-from: type=local,src=/tmp/buildx cache-to: type=local,dest=/tmp/buildx-new,mode=max context: ./src/base-ubuntu/ - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x build-args: | - BUILD_NUMBER=${{ steps.config.outputs.date }}-${{ hashFiles('versions/base.txt') }} + BUILD_NAME=${{ steps.config.outputs.BUILD_NAME }} + BUILD_VERSION=${{ steps.config.outputs.BUILD_VERSION }} + BUILD_DESC=${{ steps.config.outputs.BUILD_DESC }} + BUILD_DATE=${{ steps.config.outputs.BUILD_DATE }} + VCS_REF=${{ steps.config.outputs.VCS_REF }} BASE_IMAGE=${{ matrix.base }}:${{ matrix.version }} - S6_VERSION=${{ steps.config.outputs.s6_version }} + S6_VERSION=${{ steps.config.outputs.S6_VERSION }} tags: | - ${{ matrix.image }}:${{ matrix.version }}-s6-${{ steps.config.outputs.s6_version }} - ${{ matrix.image }}:${{ matrix.version }} - ${{ matrix.image }}:s6-${{ steps.config.outputs.s6_version }} - ${{ matrix.image }}:latest + ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} + ${{ steps.config.outputs.BUILD_NAME }}:${{ matrix.version }} + ${{ steps.config.outputs.BUILD_NAME }}:s6-${{ steps.config.outputs.S6_VERSION }} + ${{ steps.config.outputs.BUILD_NAME }}:latest - - name: Updating ${{ matrix.image }}/README.md + name: Updating ${{ steps.config.outputs.BUILD_NAME }}/README.md uses: peter-evans/dockerhub-description@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - repository: ${{ matrix.image }} - short-description: '${{ steps.config.outputs.description }}' + repository: ${{ steps.config.outputs.BUILD_NAME }} + short-description: '${{ steps.config.outputs.BUILD_DESC }}' readme-filepath: ./src/base-ubuntu/README.md - run: | @@ -190,11 +198,10 @@ jobs: id: config run: | ./.git-config/hooks/pre-commit - mkdir -p /tmp/buildx - cat versions/cli.txt + ./.git-config/hooks/pre-build src/php/fpm cat versions/fpm.txt - echo "::set-output name=date::$(date +'%Y%m%d')" - echo "::set-output name=description::$(sed '3q;d' ./README.md)" + echo "::set-output name=BUILD_NAME::${{ matrix.image }}" + echo "::set-output name=BUILD_VERSION::${{ matrix.version }}" - uses: actions/cache@v2 with: @@ -208,39 +215,46 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Building ${{ matrix.image }}:cli + name: Building ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }}-cli uses: docker/build-push-action@v2 with: push: true cache-from: type=local,src=/tmp/buildx cache-to: type=local,dest=/tmp/buildx,mode=max context: ./src/php/cli/ - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le build-args: | - BUILD_NUMBER=${{ steps.config.outputs.date }}-${{ hashFiles('versions/cli.txt') }} - BASE_IMAGE=shinsenter/s6-ubuntu:focal + BUILD_NAME=${{ steps.config.outputs.BUILD_NAME }} + BUILD_VERSION=${{ steps.config.outputs.BUILD_VERSION }}-cli + BUILD_DESC=${{ steps.config.outputs.BUILD_DESC }} + BUILD_DATE=${{ steps.config.outputs.BUILD_DATE }} + VCS_REF=${{ steps.config.outputs.VCS_REF }} + BASE_IMAGE=shinsenter/s6-ubuntu:latest PHP_VERSION=${{ matrix.version }} tags: | - ${{ matrix.image }}:cli - ${{ matrix.image }}:${{ matrix.version }} - ${{ matrix.image }}:${{ matrix.version }}-cli - ${{ matrix.image }}:latest + ${{ steps.config.outputs.BUILD_NAME }}:cli + ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} + ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }}-cli + ${{ steps.config.outputs.BUILD_NAME }}:latest - - name: Building ${{ matrix.image }}:fpm + name: Building ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }}-fpm uses: docker/build-push-action@v2 with: push: true cache-from: type=local,src=/tmp/buildx cache-to: type=local,dest=/tmp/buildx-new,mode=max context: ./src/php/fpm/ - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le build-args: | - BUILD_NUMBER=${{ steps.config.outputs.date }}-${{ hashFiles('versions/fpm.txt') }} - BASE_IMAGE=${{ matrix.image }} + BUILD_NAME=${{ steps.config.outputs.BUILD_NAME }} + BUILD_VERSION=${{ steps.config.outputs.BUILD_VERSION }}-fpm + BUILD_DESC=${{ steps.config.outputs.BUILD_DESC }} + BUILD_DATE=${{ steps.config.outputs.BUILD_DATE }} + VCS_REF=${{ steps.config.outputs.VCS_REF }} PHP_VERSION=${{ matrix.version }} tags: | - ${{ matrix.image }}:fpm - ${{ matrix.image }}:${{ matrix.version }}-fpm + ${{ steps.config.outputs.BUILD_NAME }}:fpm + ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }}-fpm - run: | rm -rf /tmp/buildx @@ -264,7 +278,7 @@ jobs: id: config run: | echo -e "\n\n$(cat ./SPONSOR.md)" >>./README.md - echo "::set-output name=description::$(sed '3q;d' ./README.md)" + echo "::set-output name=BUILD_DESC::$(sed '3q;d' ./README.md)" - name: Updating ${{ matrix.image }}/README.md uses: peter-evans/dockerhub-description@v2 @@ -272,7 +286,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} repository: ${{ matrix.image }} - short-description: '${{ steps.config.outputs.description }}' + short-description: '${{ steps.config.outputs.BUILD_DESC }}' readme-filepath: ./README.md ############################################################################## @@ -304,12 +318,10 @@ jobs: id: config run: | ./.git-config/hooks/pre-commit - mkdir -p /tmp/buildx + ./.git-config/hooks/pre-build src/servers/${{ matrix.variation }} cat versions/servers.txt - echo -e "\n\n$(cat ./SPONSOR.md)" >>./src/servers/${{ matrix.variation }}/README.md - echo "::set-output name=date::$(date +'%Y%m%d')" - echo "::set-output name=description::$(sed '3q;d' ./src/servers/${{ matrix.variation }}/README.md)" - echo "::set-output name=image_name::shinsenter/php${{ matrix.variation }}" + echo "::set-output name=BUILD_NAME::shinsenter/php${{ matrix.variation }}" + echo "::set-output name=BUILD_VERSION::php${{ matrix.version }}" - uses: actions/cache@v2 with: @@ -323,31 +335,35 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Building ${{ steps.config.outputs.image_name }}:${{ matrix.variation }} + name: Building ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} uses: docker/build-push-action@v2 with: push: true cache-from: type=local,src=/tmp/buildx cache-to: type=local,dest=/tmp/buildx-new,mode=max context: ./src/servers/${{ matrix.variation }}/ - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le build-args: | - BUILD_NUMBER=${{ steps.config.outputs.date }}-${{ hashFiles('versions/servers.txt') }} + BUILD_NAME=${{ steps.config.outputs.BUILD_NAME }} + BUILD_VERSION=${{ steps.config.outputs.BUILD_VERSION }} + BUILD_DESC=${{ steps.config.outputs.BUILD_DESC }} + BUILD_DATE=${{ steps.config.outputs.BUILD_DATE }} + VCS_REF=${{ steps.config.outputs.VCS_REF }} BASE_IMAGE=${{ matrix.image }} PHP_VERSION=${{ matrix.version }} tags: | + ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} + ${{ steps.config.outputs.BUILD_NAME }}:latest ${{ matrix.image }}:${{ matrix.version }}-${{ matrix.variation }} ${{ matrix.image }}:${{ matrix.variation }} - ${{ steps.config.outputs.image_name }}:php${{ matrix.version }} - ${{ steps.config.outputs.image_name }}:latest - - name: Updating ${{ steps.config.outputs.image_name }}/README.md + name: Updating ${{ steps.config.outputs.BUILD_NAME }}/README.md uses: peter-evans/dockerhub-description@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - repository: ${{ steps.config.outputs.image_name }} - short-description: '${{ steps.config.outputs.description }}' + repository: ${{ steps.config.outputs.BUILD_NAME }} + short-description: '${{ steps.config.outputs.BUILD_DESC }}' readme-filepath: ./src/servers/${{ matrix.variation }}/README.md - run: | @@ -384,12 +400,10 @@ jobs: id: config run: | ./.git-config/hooks/pre-commit - mkdir -p /tmp/buildx + ./.git-config/hooks/pre-build src/webapps/${{ matrix.app }} cat versions/webapps.txt - echo -e "\n\n$(cat ./SPONSOR.md)" >>./src/webapps/${{ matrix.app }}/README.md - echo "::set-output name=date::$(date +'%Y%m%d')" - echo "::set-output name=description::$(sed '3q;d' ./src/webapps/${{ matrix.app }}/README.md)" - echo "::set-output name=image_name::shinsenter/${{ matrix.app }}" + echo "::set-output name=BUILD_NAME::shinsenter/${{ matrix.app }}" + echo "::set-output name=BUILD_VERSION::php${{ matrix.version }}" - uses: actions/cache@v2 with: @@ -403,28 +417,32 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Building ${{ steps.config.outputs.image_name }} + name: Building ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} uses: docker/build-push-action@v2 with: push: true cache-from: type=local,src=/tmp/buildx cache-to: type=local,dest=/tmp/buildx-new,mode=max context: ./src/webapps/${{ matrix.app }}/ - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le build-args: | - BUILD_NUMBER=${{ steps.config.outputs.date }}-${{ hashFiles('versions/webapps.txt') }} + BUILD_NAME=${{ steps.config.outputs.BUILD_NAME }} + BUILD_VERSION=${{ steps.config.outputs.BUILD_VERSION }} + BUILD_DESC=${{ steps.config.outputs.BUILD_DESC }} + BUILD_DATE=${{ steps.config.outputs.BUILD_DATE }} + VCS_REF=${{ steps.config.outputs.VCS_REF }} PHP_VERSION=${{ matrix.version }} tags: | - ${{ steps.config.outputs.image_name }}:php${{ matrix.version }} - ${{ steps.config.outputs.image_name }}:latest + ${{ steps.config.outputs.BUILD_NAME }}:${{ steps.config.outputs.BUILD_VERSION }} + ${{ steps.config.outputs.BUILD_NAME }}:latest - - name: Updating ${{ steps.config.outputs.image_name }}/README.md + name: Updating ${{ steps.config.outputs.BUILD_NAME }}/README.md uses: peter-evans/dockerhub-description@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - repository: ${{ steps.config.outputs.image_name }} - short-description: '${{ steps.config.outputs.description }}' + repository: ${{ steps.config.outputs.BUILD_NAME }} + short-description: '${{ steps.config.outputs.BUILD_DESC }}' readme-filepath: ./src/webapps/${{ matrix.app }}/README.md - run: | diff --git a/README.md b/README.md index 1d82e459..150b9acb 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,9 @@ ENV PHP_MAX_EXECUTION_TIME="99" # Set the maximum amount of memory in bytes that a script is allowed to allocate ENV PHP_MEMORY_LIMIT="256M" +# Limit the files that can be accessed by PHP to the specified directory-tree +ENV PHP_OPEN_BASEDIR="/var/www/html" + # Sets max size of post data allowed ENV PHP_POST_MAX_SIZE="100M" @@ -248,6 +251,17 @@ ENV PHP_OPCACHE_SAVE_COMMENTS="1" ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" ``` +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. + ## Thank you [@serversideup](https://github.com/serversideup) This project is inspired by the [serversideup/docker-php](https://github.com/serversideup/docker-php) project, I love it. diff --git a/src/Metafile b/src/Metafile new file mode 100644 index 00000000..716e5365 --- /dev/null +++ b/src/Metafile @@ -0,0 +1,21 @@ +################################################################################ + +ARG BUILD_DATE +ARG BUILD_DESC +ARG BUILD_NAME +ARG BUILD_VERSION +ARG VCS_REF + +LABEL org.label-schema.schema-version="1.0" +LABEL org.label-schema.name="$BUILD_NAME" +LABEL org.label-schema.build-date="$BUILD_DATE" +LABEL org.label-schema.version="$BUILD_VERSION" +LABEL org.label-schema.description="$BUILD_DESC" +LABEL org.label-schema.vcs-ref="$VCS_REF" +LABEL org.label-schema.url="https://hub.docker.com/r/$BUILD_NAME" +LABEL org.label-schema.vcs-url="https://github.com/shinsenter/php" +LABEL org.label-schema.vendor="SHIN Company" +LABEL maintainer="shin@shin.company" +LABEL publisher="https://hub.docker.com/u/shinsenter" + +################################################################################ \ No newline at end of file diff --git a/src/base-s6/Dockerfile b/src/base-s6/Dockerfile index a8af88cf..c326b857 100644 --- a/src/base-s6/Dockerfile +++ b/src/base-s6/Dockerfile @@ -60,9 +60,4 @@ FROM scratch COPY --from=build /usr/src/s6/ / ENTRYPOINT ["/init"] -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" -LABEL maintainer="shin@shin.company" -LABEL publisher="https://hub.docker.com/u/shinsenter" +################################################################################ \ No newline at end of file diff --git a/src/base-s6/README.md b/src/base-s6/README.md index ba3864b9..9d1d2e36 100644 --- a/src/base-s6/README.md +++ b/src/base-s6/README.md @@ -31,7 +31,7 @@ RUN ... ## Supported platforms -This repository uses multi-platform images via Docker manifests. You do not need to use a platform-specific tag (although you can); Docker will automatically choose the appropriate architecture. Currently, the supported architectures are: +This repository uses multi-platform images via Docker manifests. Currently, the supported architectures are: - linux/amd64 - linux/arm/v7 @@ -39,3 +39,5 @@ This repository uses multi-platform images via Docker manifests. You do not need - linux/ppc64le - linux/riscv64 - linux/s390x + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/base-ubuntu/Dockerfile b/src/base-ubuntu/Dockerfile index a6adb466..5e296b90 100644 --- a/src/base-ubuntu/Dockerfile +++ b/src/base-ubuntu/Dockerfile @@ -78,7 +78,7 @@ ENV S6_SERVICES_GRACETIME=3000 ################################################################################ -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" -LABEL maintainer="shin@shin.company" -LABEL publisher="https://hub.docker.com/u/shinsenter" +LABEL category="os" +LABEL category="base" + +################################################################################ \ No newline at end of file diff --git a/src/base-ubuntu/README.md b/src/base-ubuntu/README.md index bc9598f8..55c57c75 100644 --- a/src/base-ubuntu/README.md +++ b/src/base-ubuntu/README.md @@ -55,3 +55,16 @@ ENV WEBHOME="/var/www/html" # sets the working directory WORKDIR $WEBHOME ``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le +- linux/riscv64 +- linux/s390x + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/php/cli/Dockerfile b/src/php/cli/Dockerfile index 24fa39c1..e10cc6fb 100644 --- a/src/php/cli/Dockerfile +++ b/src/php/cli/Dockerfile @@ -57,7 +57,4 @@ ENV COMPOSER_MAX_PARALLEL_HTTP=32 ENV PATH /composer/vendor/bin:$PATH ENV PHP_CONF_DIR=/etc/php/cli/conf.d -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/php/cli/README.md b/src/php/cli/README.md new file mode 100644 index 00000000..f379da9b --- /dev/null +++ b/src/php/cli/README.md @@ -0,0 +1,16 @@ +# shinsenter/php + +🧭 Production-ready Docker images for PHP, support PHP CLI and many types of PHP web applications. + +See: https://hub.docker.com/r/shinsenter/php + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/php/fpm/Dockerfile b/src/php/fpm/Dockerfile index 2d256858..4b1cbb76 100644 --- a/src/php/fpm/Dockerfile +++ b/src/php/fpm/Dockerfile @@ -51,7 +51,7 @@ ENV PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT" ENV PHP_MAX_EXECUTION_TIME=99 ENV PHP_MEMORY_LIMIT=256M ENV PHP_POST_MAX_SIZE=100M -ENV PHP_UPLOAD_MAX_FILE_SIZE=100M +ENV PHP_UPLOAD_MAX_FILE_SIZE=10M ENV PHPFPM_CONF_DIR=/etc/php/fpm/conf.d # adds PHP PM settings @@ -72,7 +72,4 @@ ENV PHP_OPCACHE_REVALIDATE_PATH=0 ENV PHP_OPCACHE_SAVE_COMMENTS=1 ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS=1 -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/php/fpm/README.md b/src/php/fpm/README.md new file mode 100644 index 00000000..f379da9b --- /dev/null +++ b/src/php/fpm/README.md @@ -0,0 +1,16 @@ +# shinsenter/php + +🧭 Production-ready Docker images for PHP, support PHP CLI and many types of PHP web applications. + +See: https://hub.docker.com/r/shinsenter/php + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/servers/fpm-apache/Dockerfile b/src/servers/fpm-apache/Dockerfile index e7e77604..4d16b55b 100644 --- a/src/servers/fpm-apache/Dockerfile +++ b/src/servers/fpm-apache/Dockerfile @@ -76,7 +76,4 @@ ENV APACHE_START_SERVERS=2 ENV APACHE_THREAD_LIMIT=64 ENV APACHE_THREADS_PER_CHILD=25 -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/servers/fpm-apache/README.md b/src/servers/fpm-apache/README.md index 9b12ab28..3673667a 100644 --- a/src/servers/fpm-apache/README.md +++ b/src/servers/fpm-apache/README.md @@ -96,4 +96,15 @@ ENV APACHE_THREADS_PER_CHILD="25" # Please check https://hub.docker.com/r/shinsenter/php # for more details of PHP environment variables. -``` \ No newline at end of file +``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/servers/fpm-nginx/Dockerfile b/src/servers/fpm-nginx/Dockerfile index 2892ac0d..f4d37db6 100644 --- a/src/servers/fpm-nginx/Dockerfile +++ b/src/servers/fpm-nginx/Dockerfile @@ -56,7 +56,4 @@ ENV DEBUG_MODE=false ENV MSMTP_RELAY_SERVER_HOSTNAME=mailhog ENV MSMTP_RELAY_SERVER_PORT=1025 -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/servers/fpm-nginx/README.md b/src/servers/fpm-nginx/README.md index 65d408a8..33bac651 100644 --- a/src/servers/fpm-nginx/README.md +++ b/src/servers/fpm-nginx/README.md @@ -71,4 +71,15 @@ WORKDIR $WEBHOME # Please check https://hub.docker.com/r/shinsenter/php # for more details of PHP environment variables. -``` \ No newline at end of file +``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/webapps/codeigniter4/Dockerfile b/src/webapps/codeigniter4/Dockerfile index 8d1b6a01..54ea71b6 100644 --- a/src/webapps/codeigniter4/Dockerfile +++ b/src/webapps/codeigniter4/Dockerfile @@ -19,7 +19,4 @@ ENV APACHE_DOCUMENT_ROOT="/public" # sets the working directory WORKDIR $WEBHOME -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/webapps/codeigniter4/README.md b/src/webapps/codeigniter4/README.md index 28ed8cb1..ec6ba23d 100644 --- a/src/webapps/codeigniter4/README.md +++ b/src/webapps/codeigniter4/README.md @@ -56,7 +56,6 @@ ENV PGID=9999 # sets web server root path ENV WEBHOME="/var/www/html" -ENV APACHE_DOCUMENT_ROOT="/public" # sets the working directory WORKDIR $WEBHOME @@ -65,4 +64,18 @@ WORKDIR $WEBHOME # Please check https://hub.docker.com/r/shinsenter/php # for more details of PHP environment variables. -``` \ No newline at end of file + +# Please check https://hub.docker.com/r/shinsenter/phpfpm-apache +# for more details of Apache environment variables. +``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/webapps/laravel/Dockerfile b/src/webapps/laravel/Dockerfile index 7bd5f5ce..2057fbf5 100644 --- a/src/webapps/laravel/Dockerfile +++ b/src/webapps/laravel/Dockerfile @@ -30,7 +30,4 @@ ENV LARAVEL_AUTO_OPTIMIZE=true ENV LARAVEL_LINK_STORAGE=true ENV LARAVEL_AUTO_MIGRATION=false -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/webapps/laravel/README.md b/src/webapps/laravel/README.md index fb4851b5..4f771680 100644 --- a/src/webapps/laravel/README.md +++ b/src/webapps/laravel/README.md @@ -53,11 +53,9 @@ ENV TZ="UTC" # sets GID and UID ENV PUID=9999 ENV PGID=9999 -ENV WEBHOME="/var/www/html" # sets web server root path ENV WEBHOME="/var/www/html" -ENV NGINX_DOCUMENT_ROOT="/public" # sets the working directory WORKDIR $WEBHOME @@ -77,4 +75,18 @@ ENV LARAVEL_AUTO_MIGRATION=false # Please check https://hub.docker.com/r/shinsenter/php # for more details of PHP environment variables. -``` \ No newline at end of file + +# Please check https://hub.docker.com/r/shinsenter/phpfpm-nginx +# for more details of Nginx environment variables. +``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/webapps/phpmyadmin/Dockerfile b/src/webapps/phpmyadmin/Dockerfile index 29dbf2d1..1d12a2ed 100644 --- a/src/webapps/phpmyadmin/Dockerfile +++ b/src/webapps/phpmyadmin/Dockerfile @@ -48,7 +48,4 @@ ENV PMA_HOST=mysql # ENV PMA_QUERYHISTORYDB= # ENV PMA_QUERYHISTORYMAX= -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/webapps/phpmyadmin/README.md b/src/webapps/phpmyadmin/README.md index 578e5841..14efc080 100644 --- a/src/webapps/phpmyadmin/README.md +++ b/src/webapps/phpmyadmin/README.md @@ -56,7 +56,6 @@ ENV PGID=9999 # sets web server root path ENV WEBHOME="/var/www/html" -ENV NGINX_DOCUMENT_ROOT="" # sets the working directory WORKDIR $WEBHOME @@ -87,6 +86,26 @@ ENV PMA_PASSWORD= # ========================================================== +# recommended settings +ENV PHP_MAX_EXECUTION_TIME=600 +ENV PHP_MEMORY_LIMIT=512M +ENV PHP_POST_MAX_SIZE=2G +ENV PHP_UPLOAD_MAX_FILE_SIZE=2G + # Please check https://hub.docker.com/r/shinsenter/php # for more details of PHP environment variables. -``` \ No newline at end of file + +# Please check https://hub.docker.com/r/shinsenter/phpfpm-nginx +# for more details of Nginx environment variables. +``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/webapps/symfony/Dockerfile b/src/webapps/symfony/Dockerfile index 1d0c9944..5f16a1f3 100644 --- a/src/webapps/symfony/Dockerfile +++ b/src/webapps/symfony/Dockerfile @@ -24,7 +24,4 @@ WORKDIR $WEBHOME # set more env variables ENV SYMFONY_INSTALL_DEVKIT=false -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/webapps/symfony/README.md b/src/webapps/symfony/README.md index 025bdfe9..b0b92f2c 100644 --- a/src/webapps/symfony/README.md +++ b/src/webapps/symfony/README.md @@ -53,6 +53,8 @@ ENV TZ="UTC" # sets GID and UID ENV PUID=9999 ENV PGID=9999 + +# sets web server root path ENV WEBHOME="/var/www/html" # sets the working directory @@ -67,4 +69,18 @@ ENV SYMFONY_INSTALL_DEVKIT=false # Please check https://hub.docker.com/r/shinsenter/php # for more details of PHP environment variables. -``` \ No newline at end of file + +# Please check https://hub.docker.com/r/shinsenter/phpfpm-nginx +# for more details of Nginx environment variables. +``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file diff --git a/src/webapps/wordpress/Dockerfile b/src/webapps/wordpress/Dockerfile index 6aa90acb..969b76e0 100644 --- a/src/webapps/wordpress/Dockerfile +++ b/src/webapps/wordpress/Dockerfile @@ -35,10 +35,13 @@ WORKDIR $WEBHOME ################################################################################ +# overrides parents env variables +ENV PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING" +ENV PHP_MAX_EXECUTION_TIME=300 +ENV PHP_POST_MAX_SIZE=100M +ENV PHP_UPLOAD_MAX_FILE_SIZE=10M + # set more env variables ENV WORDPRESS_LOCALE="en_US" -################################################################################ - -ARG BUILD_NUMBER -LABEL build_number="$BUILD_NUMBER" \ No newline at end of file +################################################################################ \ No newline at end of file diff --git a/src/webapps/wordpress/README.md b/src/webapps/wordpress/README.md index 5bfdacae..fed93fc2 100644 --- a/src/webapps/wordpress/README.md +++ b/src/webapps/wordpress/README.md @@ -56,18 +56,37 @@ ENV PGID=9999 # sets web server root path ENV WEBHOME="/var/www/html" -ENV APACHE_DOCUMENT_ROOT="" # sets the working directory WORKDIR $WEBHOME # ========================================================== -# The locale for a fresh Wordpress +# the locale for a fresh Wordpress ENV WORDPRESS_LOCALE="en_US" # ========================================================== +# recommended settings +ENV PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING" +ENV PHP_MAX_EXECUTION_TIME=300 +ENV PHP_POST_MAX_SIZE=100M +ENV PHP_UPLOAD_MAX_FILE_SIZE=10M + # Please check https://hub.docker.com/r/shinsenter/php # for more details of PHP environment variables. -``` \ No newline at end of file + +# Please check https://hub.docker.com/r/shinsenter/phpfpm-apache +# for more details of Apache environment variables. +``` + +## Supported platforms + +Currently, the supported architectures are: + +- linux/amd64 +- linux/arm/v7 +- linux/arm64 +- linux/ppc64le + +You do not need to use a platform-specific tag (although you can), Docker will automatically choose the appropriate architecture. \ No newline at end of file