├── 7.4
├── .exclude-rhel7
├── .exclude-fedora
├── test
│ ├── run
│ ├── examples
│ ├── test-app
│ ├── __init__.py
│ ├── conftest.py
│ ├── imagestreams
│ ├── run-pytest
│ ├── constants.py
│ ├── test-lib.sh
│ ├── test-lib-php.sh
│ ├── self-signed-ssl
│ ├── run-openshift-pytest
│ ├── test-openshift.yaml
│ ├── test_container_ssl.py
│ ├── test-lib-openshift.sh
│ ├── test_container_basics.py
│ ├── run-openshift-remote-cluster
│ ├── test-lib-remote-openshift.sh
│ ├── test_container_application.py
│ ├── test_ocp_php_s2i_integration.py
│ ├── test_ocp_php_deploy_templates.py
│ ├── test_ocp_php_s2i_imagestreams.py
│ ├── test_ocp_php_latest_imagestreams.py
│ ├── test_ocp_shared_helm_cakephp_application.py
│ └── test_ocp_shared_helm_chart_imagestreams.py
├── s2i
│ └── bin
│ │ ├── save-artifacts
│ │ ├── usage
│ │ ├── assemble
│ │ └── run
├── root
│ ├── usr
│ │ ├── share
│ │ │ └── container-scripts
│ │ │ │ └── php
│ │ │ │ ├── httpd-cnf
│ │ │ │ ├── 00-documentroot.conf
│ │ │ │ └── 50-mpm-tuning.conf
│ │ │ │ ├── post-assemble
│ │ │ │ ├── 40-ssl-certs.sh
│ │ │ │ └── 20-copy-config.sh
│ │ │ │ └── pre-start
│ │ │ │ ├── 40-ssl-certs.sh
│ │ │ │ └── 20-copy-config.sh
│ │ └── libexec
│ │ │ └── container-setup
│ └── opt
│ │ └── app-root
│ │ └── etc
│ │ └── php.d
│ │ └── 10-opcache.ini.template
├── Dockerfile.fedora
└── Dockerfile.rhel8
├── 8.0
├── .exclude-c9s
├── .exclude-rhel8
├── .exclude-fedora
├── test
│ ├── run
│ ├── examples
│ ├── test-app
│ ├── __init__.py
│ ├── conftest.py
│ ├── imagestreams
│ ├── run-pytest
│ ├── test-lib.sh
│ ├── test-lib-php.sh
│ ├── self-signed-ssl
│ ├── run-openshift-pytest
│ ├── test-openshift.yaml
│ ├── test_container_ssl.py
│ ├── test-lib-openshift.sh
│ ├── test_container_basics.py
│ ├── run-openshift-remote-cluster
│ ├── test-lib-remote-openshift.sh
│ ├── test_container_application.py
│ ├── test_ocp_php_s2i_integration.py
│ ├── test_ocp_php_deploy_templates.py
│ ├── test_ocp_php_s2i_imagestreams.py
│ ├── test_ocp_php_latest_imagestreams.py
│ ├── test_ocp_shared_helm_cakephp_application.py
│ └── test_ocp_shared_helm_chart_imagestreams.py
├── s2i
│ └── bin
│ │ ├── save-artifacts
│ │ ├── usage
│ │ ├── assemble
│ │ └── run
├── root
│ ├── usr
│ │ ├── share
│ │ │ └── container-scripts
│ │ │ │ └── php
│ │ │ │ ├── httpd-cnf
│ │ │ │ ├── 00-documentroot.conf
│ │ │ │ └── 50-mpm-tuning.conf
│ │ │ │ ├── post-assemble
│ │ │ │ ├── 40-ssl-certs.sh
│ │ │ │ └── 20-copy-config.sh
│ │ │ │ └── pre-start
│ │ │ │ ├── 40-ssl-certs.sh
│ │ │ │ ├── 60-fpm.sh
│ │ │ │ └── 20-copy-config.sh
│ │ └── libexec
│ │ │ └── container-setup
│ └── opt
│ │ └── app-root
│ │ └── etc
│ │ └── php.d
│ │ └── 10-opcache.ini.template
├── Dockerfile.fedora
├── Dockerfile.rhel8
├── Dockerfile.c9s
└── Dockerfile.rhel9
├── 8.1
├── .exclude-c9s
├── .exclude-rhel8
├── test
│ ├── run
│ ├── examples
│ ├── test-app
│ ├── __init__.py
│ ├── conftest.py
│ ├── imagestreams
│ ├── run-pytest
│ ├── test-lib.sh
│ ├── test-lib-php.sh
│ ├── self-signed-ssl
│ ├── run-openshift-pytest
│ ├── test-openshift.yaml
│ ├── test_container_ssl.py
│ ├── test-lib-openshift.sh
│ ├── test_container_basics.py
│ ├── run-openshift-remote-cluster
│ ├── test-lib-remote-openshift.sh
│ ├── test_container_application.py
│ ├── test_ocp_php_s2i_integration.py
│ ├── test_ocp_php_deploy_templates.py
│ ├── test_ocp_php_s2i_imagestreams.py
│ ├── test_ocp_php_latest_imagestreams.py
│ ├── test_ocp_shared_helm_cakephp_application.py
│ └── test_ocp_shared_helm_chart_imagestreams.py
├── s2i
│ └── bin
│ │ ├── save-artifacts
│ │ ├── usage
│ │ ├── assemble
│ │ └── run
├── README.md
├── root
│ ├── usr
│ │ ├── share
│ │ │ └── container-scripts
│ │ │ │ └── php
│ │ │ │ ├── httpd-cnf
│ │ │ │ ├── 00-documentroot.conf
│ │ │ │ └── 50-mpm-tuning.conf
│ │ │ │ ├── post-assemble
│ │ │ │ ├── 40-ssl-certs.sh
│ │ │ │ └── 20-copy-config.sh
│ │ │ │ └── pre-start
│ │ │ │ ├── 40-ssl-certs.sh
│ │ │ │ ├── 60-fpm.sh
│ │ │ │ └── 20-copy-config.sh
│ │ └── libexec
│ │ │ └── container-setup
│ └── opt
│ │ └── app-root
│ │ └── etc
│ │ └── php.d
│ │ └── 10-opcache.ini.template
├── Dockerfile.fedora
├── Dockerfile.rhel8
├── Dockerfile.c9s
└── Dockerfile.rhel9
├── 8.2
├── .exclude-c9s
├── test
│ ├── run
│ ├── examples
│ ├── test-app
│ ├── __init__.py
│ ├── conftest.py
│ ├── imagestreams
│ ├── run-pytest
│ ├── test-lib.sh
│ ├── test-lib-php.sh
│ ├── self-signed-ssl
│ ├── run-openshift-pytest
│ ├── test-openshift.yaml
│ ├── test_container_ssl.py
│ ├── test-lib-openshift.sh
│ ├── test_container_basics.py
│ ├── run-openshift-remote-cluster
│ ├── test-lib-remote-openshift.sh
│ ├── test_container_application.py
│ ├── test_ocp_php_s2i_integration.py
│ ├── test_ocp_php_deploy_templates.py
│ ├── test_ocp_php_s2i_imagestreams.py
│ ├── test_ocp_php_latest_imagestreams.py
│ ├── test_ocp_shared_helm_cakephp_application.py
│ └── test_ocp_shared_helm_chart_imagestreams.py
├── s2i
│ └── bin
│ │ ├── save-artifacts
│ │ ├── usage
│ │ ├── assemble
│ │ └── run
├── root
│ └── usr
│ │ ├── share
│ │ └── container-scripts
│ │ │ └── php
│ │ │ ├── httpd-cnf
│ │ │ ├── 00-documentroot.conf
│ │ │ └── 50-mpm-tuning.conf
│ │ │ ├── post-assemble
│ │ │ ├── 40-ssl-certs.sh
│ │ │ └── 20-copy-config.sh
│ │ │ └── pre-start
│ │ │ ├── 40-ssl-certs.sh
│ │ │ ├── 60-fpm.sh
│ │ │ └── 20-copy-config.sh
│ │ └── libexec
│ │ └── container-setup
├── Dockerfile.fedora
├── Dockerfile.rhel8
├── Dockerfile.c9s
└── Dockerfile.rhel9
├── 8.3
├── .exclude-rhel8
├── test
│ ├── run
│ ├── examples
│ ├── test-app
│ ├── __init__.py
│ ├── conftest.py
│ ├── imagestreams
│ ├── run-pytest
│ ├── test-lib.sh
│ ├── test-lib-php.sh
│ ├── self-signed-ssl
│ ├── run-openshift-pytest
│ ├── test-openshift.yaml
│ ├── test_container_ssl.py
│ ├── test-lib-openshift.sh
│ ├── test_container_basics.py
│ ├── run-openshift-remote-cluster
│ ├── test-lib-remote-openshift.sh
│ ├── test_container_application.py
│ ├── test_ocp_php_s2i_integration.py
│ ├── test_ocp_php_deploy_templates.py
│ ├── test_ocp_php_s2i_imagestreams.py
│ ├── test_ocp_php_latest_imagestreams.py
│ ├── test_ocp_shared_helm_cakephp_application.py
│ └── test_ocp_shared_helm_chart_imagestreams.py
├── s2i
│ └── bin
│ │ ├── save-artifacts
│ │ ├── usage
│ │ ├── assemble
│ │ └── run
├── root
│ └── usr
│ │ ├── share
│ │ └── container-scripts
│ │ │ └── php
│ │ │ ├── httpd-cnf
│ │ │ ├── 00-documentroot.conf
│ │ │ └── 50-mpm-tuning.conf
│ │ │ ├── post-assemble
│ │ │ ├── 40-ssl-certs.sh
│ │ │ └── 20-copy-config.sh
│ │ │ └── pre-start
│ │ │ ├── 40-ssl-certs.sh
│ │ │ ├── 60-fpm.sh
│ │ │ └── 20-copy-config.sh
│ │ └── libexec
│ │ └── container-setup
├── Dockerfile.fedora
├── Dockerfile.rhel8
├── Dockerfile.rhel10
├── Dockerfile.c10s
├── Dockerfile.c9s
└── Dockerfile.rhel9
├── test
├── __init__.py
├── examples
├── imagestreams
├── test-lib.sh
├── test-openshift.yaml
├── check_imagestreams.py
├── test-lib-openshift.sh
├── show_all_imagestreams.py
├── test-lib-remote-openshift.sh
├── test-app
│ ├── session_test.php
│ ├── composer.json
│ └── index.php
├── run-openshift-pytest
├── run-pytest
├── test_ocp_php_latest_imagestreams.py
├── test_ocp_php_s2i_integration.py
├── conftest.py
├── run-openshift-remote-cluster
├── test_ocp_php_s2i_imagestreams.py
├── test_ocp_shared_helm_cakephp_application.py
├── test_ocp_php_deploy_templates.py
├── test_ocp_shared_helm_chart_imagestreams.py
├── test_container_basics.py
├── test-lib-php.sh
└── test_container_ssl.py
├── 7.3
└── test
│ ├── conftest.py
│ ├── run-pytest
│ ├── test_container_ssl.py
│ ├── test_container_basics.py
│ ├── test_container_application.py
│ ├── test_ocp_php_s2i_integration.py
│ ├── test_ocp_php_deploy_templates.py
│ ├── test_ocp_php_s2i_imagestreams.py
│ ├── test_ocp_php_latest_imagestreams.py
│ ├── test_ocp_shared_helm_cakephp_application.py
│ └── test_ocp_shared_helm_chart_imagestreams.py
├── .github
├── auto-merge.yml
├── dependabot.yml
└── workflows
│ ├── container-tests.yml
│ ├── pr-metadata.yml
│ ├── auto-merge.yml
│ ├── build-and-push.yml
│ └── auto-merge-on-demand.yml
├── examples
├── from-dockerfile
│ ├── .gitignore
│ ├── README.md
│ ├── Dockerfile
│ └── Dockerfile.s2i
└── self-signed-ssl
│ ├── index.html
│ └── httpd-ssl
│ ├── certs
│ └── server-cert-selfsigned.pem
│ └── private
│ └── server-key.pem
├── .gitmodules
├── .gitignore
├── Makefile
└── imagestreams
└── imagestreams.yaml
/7.4/.exclude-rhel7:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/8.0/.exclude-c9s:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/8.0/.exclude-rhel8:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/8.1/.exclude-c9s:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/8.1/.exclude-rhel8:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/8.2/.exclude-c9s:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/8.3/.exclude-rhel8:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/7.4/.exclude-fedora:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/8.0/.exclude-fedora:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/7.4/test/run:
--------------------------------------------------------------------------------
1 | ../../test/run
--------------------------------------------------------------------------------
/8.0/test/run:
--------------------------------------------------------------------------------
1 | ../../test/run
--------------------------------------------------------------------------------
/8.1/test/run:
--------------------------------------------------------------------------------
1 | ../../test/run
--------------------------------------------------------------------------------
/8.2/test/run:
--------------------------------------------------------------------------------
1 | ../../test/run
--------------------------------------------------------------------------------
/8.3/test/run:
--------------------------------------------------------------------------------
1 | ../../test/run
--------------------------------------------------------------------------------
/test/examples:
--------------------------------------------------------------------------------
1 | ../examples/
--------------------------------------------------------------------------------
/7.4/test/examples:
--------------------------------------------------------------------------------
1 | ../../examples/
--------------------------------------------------------------------------------
/8.0/test/examples:
--------------------------------------------------------------------------------
1 | ../../examples/
--------------------------------------------------------------------------------
/8.1/test/examples:
--------------------------------------------------------------------------------
1 | ../../examples
--------------------------------------------------------------------------------
/8.2/test/examples:
--------------------------------------------------------------------------------
1 | ../../examples
--------------------------------------------------------------------------------
/8.3/test/examples:
--------------------------------------------------------------------------------
1 | ../../examples/
--------------------------------------------------------------------------------
/test/imagestreams:
--------------------------------------------------------------------------------
1 | ../imagestreams/
--------------------------------------------------------------------------------
/7.4/test/test-app:
--------------------------------------------------------------------------------
1 | ../../test/test-app/
--------------------------------------------------------------------------------
/8.0/test/test-app:
--------------------------------------------------------------------------------
1 | ../../test/test-app/
--------------------------------------------------------------------------------
/8.1/test/test-app:
--------------------------------------------------------------------------------
1 | ../../test/test-app/
--------------------------------------------------------------------------------
/8.2/test/test-app:
--------------------------------------------------------------------------------
1 | ../../test/test-app
--------------------------------------------------------------------------------
/8.3/test/test-app:
--------------------------------------------------------------------------------
1 | ../../test/test-app/
--------------------------------------------------------------------------------
/test/test-lib.sh:
--------------------------------------------------------------------------------
1 | ../common/test-lib.sh
--------------------------------------------------------------------------------
/7.3/test/conftest.py:
--------------------------------------------------------------------------------
1 | ../../test/conftest.py
--------------------------------------------------------------------------------
/7.3/test/run-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-pytest
--------------------------------------------------------------------------------
/7.4/test/__init__.py:
--------------------------------------------------------------------------------
1 | ../../test/__init__.py
--------------------------------------------------------------------------------
/7.4/test/conftest.py:
--------------------------------------------------------------------------------
1 | ../../test/conftest.py
--------------------------------------------------------------------------------
/7.4/test/imagestreams:
--------------------------------------------------------------------------------
1 | ../../imagestreams/
--------------------------------------------------------------------------------
/7.4/test/run-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-pytest
--------------------------------------------------------------------------------
/8.0/test/__init__.py:
--------------------------------------------------------------------------------
1 | ../../test/__init__.py
--------------------------------------------------------------------------------
/8.0/test/conftest.py:
--------------------------------------------------------------------------------
1 | ../../test/conftest.py
--------------------------------------------------------------------------------
/8.0/test/imagestreams:
--------------------------------------------------------------------------------
1 | ../../imagestreams/
--------------------------------------------------------------------------------
/8.0/test/run-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-pytest
--------------------------------------------------------------------------------
/8.1/test/__init__.py:
--------------------------------------------------------------------------------
1 | ../../test/__init__.py
--------------------------------------------------------------------------------
/8.1/test/conftest.py:
--------------------------------------------------------------------------------
1 | ../../test/conftest.py
--------------------------------------------------------------------------------
/8.1/test/imagestreams:
--------------------------------------------------------------------------------
1 | ../../imagestreams/
--------------------------------------------------------------------------------
/8.1/test/run-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-pytest
--------------------------------------------------------------------------------
/8.2/test/__init__.py:
--------------------------------------------------------------------------------
1 | ../../test/__init__.py
--------------------------------------------------------------------------------
/8.2/test/conftest.py:
--------------------------------------------------------------------------------
1 | ../../test/conftest.py
--------------------------------------------------------------------------------
/8.2/test/imagestreams:
--------------------------------------------------------------------------------
1 | ../../imagestreams
--------------------------------------------------------------------------------
/8.2/test/run-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-pytest
--------------------------------------------------------------------------------
/8.3/test/__init__.py:
--------------------------------------------------------------------------------
1 | ../../test/__init__.py
--------------------------------------------------------------------------------
/8.3/test/conftest.py:
--------------------------------------------------------------------------------
1 | ../../test/conftest.py
--------------------------------------------------------------------------------
/8.3/test/imagestreams:
--------------------------------------------------------------------------------
1 | ../../imagestreams/
--------------------------------------------------------------------------------
/8.3/test/run-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-pytest
--------------------------------------------------------------------------------
/.github/auto-merge.yml:
--------------------------------------------------------------------------------
1 | target-branch: []
2 |
--------------------------------------------------------------------------------
/7.4/test/constants.py:
--------------------------------------------------------------------------------
1 | ../../test/constants.py
--------------------------------------------------------------------------------
/7.4/test/test-lib.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib.sh
--------------------------------------------------------------------------------
/8.0/test/test-lib.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib.sh
--------------------------------------------------------------------------------
/8.1/test/test-lib.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib.sh
--------------------------------------------------------------------------------
/8.2/test/test-lib.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib.sh
--------------------------------------------------------------------------------
/8.3/test/test-lib.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib.sh
--------------------------------------------------------------------------------
/examples/from-dockerfile/.gitignore:
--------------------------------------------------------------------------------
1 | app-src
2 |
--------------------------------------------------------------------------------
/7.4/test/test-lib-php.sh:
--------------------------------------------------------------------------------
1 | ../../test/test-lib-php.sh
--------------------------------------------------------------------------------
/8.0/test/test-lib-php.sh:
--------------------------------------------------------------------------------
1 | ../../test/test-lib-php.sh
--------------------------------------------------------------------------------
/8.1/test/test-lib-php.sh:
--------------------------------------------------------------------------------
1 | ../../test/test-lib-php.sh
--------------------------------------------------------------------------------
/8.2/test/test-lib-php.sh:
--------------------------------------------------------------------------------
1 | ../../test/test-lib-php.sh
--------------------------------------------------------------------------------
/8.3/test/test-lib-php.sh:
--------------------------------------------------------------------------------
1 | ../../test/test-lib-php.sh
--------------------------------------------------------------------------------
/test/test-openshift.yaml:
--------------------------------------------------------------------------------
1 | ../common/test-openshift.yaml
--------------------------------------------------------------------------------
/7.4/test/self-signed-ssl:
--------------------------------------------------------------------------------
1 | ../../examples/self-signed-ssl/
--------------------------------------------------------------------------------
/8.0/test/self-signed-ssl:
--------------------------------------------------------------------------------
1 | ../../examples/self-signed-ssl/
--------------------------------------------------------------------------------
/8.1/test/self-signed-ssl:
--------------------------------------------------------------------------------
1 | ../../examples/self-signed-ssl/
--------------------------------------------------------------------------------
/8.2/test/self-signed-ssl:
--------------------------------------------------------------------------------
1 | ../../examples/self-signed-ssl
--------------------------------------------------------------------------------
/8.3/test/self-signed-ssl:
--------------------------------------------------------------------------------
1 | ../../examples/self-signed-ssl/
--------------------------------------------------------------------------------
/examples/self-signed-ssl/index.html:
--------------------------------------------------------------------------------
1 | SSL test works
2 |
--------------------------------------------------------------------------------
/test/check_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../common/check_imagestreams.py
--------------------------------------------------------------------------------
/test/test-lib-openshift.sh:
--------------------------------------------------------------------------------
1 | ../common/test-lib-openshift.sh
--------------------------------------------------------------------------------
/7.3/test/test_container_ssl.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_ssl.py
--------------------------------------------------------------------------------
/7.4/test/run-openshift-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-pytest
--------------------------------------------------------------------------------
/7.4/test/test-openshift.yaml:
--------------------------------------------------------------------------------
1 | ../../common/test-openshift.yaml
--------------------------------------------------------------------------------
/7.4/test/test_container_ssl.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_ssl.py
--------------------------------------------------------------------------------
/8.0/test/run-openshift-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-pytest
--------------------------------------------------------------------------------
/8.0/test/test-openshift.yaml:
--------------------------------------------------------------------------------
1 | ../../common/test-openshift.yaml
--------------------------------------------------------------------------------
/8.0/test/test_container_ssl.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_ssl.py
--------------------------------------------------------------------------------
/8.1/test/run-openshift-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-pytest
--------------------------------------------------------------------------------
/8.1/test/test-openshift.yaml:
--------------------------------------------------------------------------------
1 | ../../common/test-openshift.yaml
--------------------------------------------------------------------------------
/8.1/test/test_container_ssl.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_ssl.py
--------------------------------------------------------------------------------
/8.2/test/run-openshift-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-pytest
--------------------------------------------------------------------------------
/8.2/test/test-openshift.yaml:
--------------------------------------------------------------------------------
1 | ../../common/test-openshift.yaml
--------------------------------------------------------------------------------
/8.2/test/test_container_ssl.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_ssl.py
--------------------------------------------------------------------------------
/8.3/test/run-openshift-pytest:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-pytest
--------------------------------------------------------------------------------
/8.3/test/test-openshift.yaml:
--------------------------------------------------------------------------------
1 | ../../common/test-openshift.yaml
--------------------------------------------------------------------------------
/8.3/test/test_container_ssl.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_ssl.py
--------------------------------------------------------------------------------
/test/show_all_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../common/show_all_imagestreams.py
--------------------------------------------------------------------------------
/7.3/test/test_container_basics.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_basics.py
--------------------------------------------------------------------------------
/7.4/test/test-lib-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-openshift.sh
--------------------------------------------------------------------------------
/7.4/test/test_container_basics.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_basics.py
--------------------------------------------------------------------------------
/8.0/test/test-lib-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-openshift.sh
--------------------------------------------------------------------------------
/8.0/test/test_container_basics.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_basics.py
--------------------------------------------------------------------------------
/8.1/test/test-lib-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-openshift.sh
--------------------------------------------------------------------------------
/8.1/test/test_container_basics.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_basics.py
--------------------------------------------------------------------------------
/8.2/test/test-lib-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-openshift.sh
--------------------------------------------------------------------------------
/8.2/test/test_container_basics.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_basics.py
--------------------------------------------------------------------------------
/8.3/test/test-lib-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-openshift.sh
--------------------------------------------------------------------------------
/8.3/test/test_container_basics.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_basics.py
--------------------------------------------------------------------------------
/test/test-lib-remote-openshift.sh:
--------------------------------------------------------------------------------
1 | ../common/test-lib-remote-openshift.sh
--------------------------------------------------------------------------------
/7.3/test/test_container_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_application.py
--------------------------------------------------------------------------------
/7.4/test/run-openshift-remote-cluster:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-remote-cluster
--------------------------------------------------------------------------------
/7.4/test/test-lib-remote-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-remote-openshift.sh
--------------------------------------------------------------------------------
/7.4/test/test_container_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_application.py
--------------------------------------------------------------------------------
/8.0/test/run-openshift-remote-cluster:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-remote-cluster
--------------------------------------------------------------------------------
/8.0/test/test-lib-remote-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-remote-openshift.sh
--------------------------------------------------------------------------------
/8.0/test/test_container_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_application.py
--------------------------------------------------------------------------------
/8.1/test/run-openshift-remote-cluster:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-remote-cluster
--------------------------------------------------------------------------------
/8.1/test/test-lib-remote-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-remote-openshift.sh
--------------------------------------------------------------------------------
/8.1/test/test_container_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_application.py
--------------------------------------------------------------------------------
/8.2/test/run-openshift-remote-cluster:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-remote-cluster
--------------------------------------------------------------------------------
/8.2/test/test-lib-remote-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-remote-openshift.sh
--------------------------------------------------------------------------------
/8.2/test/test_container_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_application.py
--------------------------------------------------------------------------------
/8.3/test/run-openshift-remote-cluster:
--------------------------------------------------------------------------------
1 | ../../test/run-openshift-remote-cluster
--------------------------------------------------------------------------------
/8.3/test/test-lib-remote-openshift.sh:
--------------------------------------------------------------------------------
1 | ../../common/test-lib-remote-openshift.sh
--------------------------------------------------------------------------------
/8.3/test/test_container_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_container_application.py
--------------------------------------------------------------------------------
/7.3/test/test_ocp_php_s2i_integration.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_integration.py
--------------------------------------------------------------------------------
/7.4/test/test_ocp_php_s2i_integration.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_integration.py
--------------------------------------------------------------------------------
/8.0/test/test_ocp_php_s2i_integration.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_integration.py
--------------------------------------------------------------------------------
/8.1/test/test_ocp_php_s2i_integration.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_integration.py
--------------------------------------------------------------------------------
/8.2/test/test_ocp_php_s2i_integration.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_integration.py
--------------------------------------------------------------------------------
/8.3/test/test_ocp_php_s2i_integration.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_integration.py
--------------------------------------------------------------------------------
/7.3/test/test_ocp_php_deploy_templates.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_deploy_templates.py
--------------------------------------------------------------------------------
/7.3/test/test_ocp_php_s2i_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_imagestreams.py
--------------------------------------------------------------------------------
/7.4/test/test_ocp_php_deploy_templates.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_deploy_templates.py
--------------------------------------------------------------------------------
/7.4/test/test_ocp_php_s2i_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_imagestreams.py
--------------------------------------------------------------------------------
/8.0/test/test_ocp_php_deploy_templates.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_deploy_templates.py
--------------------------------------------------------------------------------
/8.0/test/test_ocp_php_s2i_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_imagestreams.py
--------------------------------------------------------------------------------
/8.1/test/test_ocp_php_deploy_templates.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_deploy_templates.py
--------------------------------------------------------------------------------
/8.1/test/test_ocp_php_s2i_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_imagestreams.py
--------------------------------------------------------------------------------
/8.2/test/test_ocp_php_deploy_templates.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_deploy_templates.py
--------------------------------------------------------------------------------
/8.2/test/test_ocp_php_s2i_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_imagestreams.py
--------------------------------------------------------------------------------
/8.3/test/test_ocp_php_deploy_templates.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_deploy_templates.py
--------------------------------------------------------------------------------
/8.3/test/test_ocp_php_s2i_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_s2i_imagestreams.py
--------------------------------------------------------------------------------
/7.3/test/test_ocp_php_latest_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_latest_imagestreams.py
--------------------------------------------------------------------------------
/7.4/test/test_ocp_php_latest_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_latest_imagestreams.py
--------------------------------------------------------------------------------
/8.0/test/test_ocp_php_latest_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_latest_imagestreams.py
--------------------------------------------------------------------------------
/8.1/test/test_ocp_php_latest_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_latest_imagestreams.py
--------------------------------------------------------------------------------
/8.2/test/test_ocp_php_latest_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_latest_imagestreams.py
--------------------------------------------------------------------------------
/8.3/test/test_ocp_php_latest_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_php_latest_imagestreams.py
--------------------------------------------------------------------------------
/test/test-app/session_test.php:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/7.3/test/test_ocp_shared_helm_cakephp_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_cakephp_application.py
--------------------------------------------------------------------------------
/7.3/test/test_ocp_shared_helm_chart_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_chart_imagestreams.py
--------------------------------------------------------------------------------
/7.4/test/test_ocp_shared_helm_cakephp_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_cakephp_application.py
--------------------------------------------------------------------------------
/7.4/test/test_ocp_shared_helm_chart_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_chart_imagestreams.py
--------------------------------------------------------------------------------
/8.0/test/test_ocp_shared_helm_cakephp_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_cakephp_application.py
--------------------------------------------------------------------------------
/8.0/test/test_ocp_shared_helm_chart_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_chart_imagestreams.py
--------------------------------------------------------------------------------
/8.1/test/test_ocp_shared_helm_cakephp_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_cakephp_application.py
--------------------------------------------------------------------------------
/8.1/test/test_ocp_shared_helm_chart_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_chart_imagestreams.py
--------------------------------------------------------------------------------
/8.2/test/test_ocp_shared_helm_cakephp_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_cakephp_application.py
--------------------------------------------------------------------------------
/8.2/test/test_ocp_shared_helm_chart_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_chart_imagestreams.py
--------------------------------------------------------------------------------
/8.3/test/test_ocp_shared_helm_cakephp_application.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_cakephp_application.py
--------------------------------------------------------------------------------
/8.3/test/test_ocp_shared_helm_chart_imagestreams.py:
--------------------------------------------------------------------------------
1 | ../../test/test_ocp_shared_helm_chart_imagestreams.py
--------------------------------------------------------------------------------
/7.4/s2i/bin/save-artifacts:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pushd ${HOME} >/dev/null
3 | tar cf - vendor
4 | popd >/dev/null
5 |
--------------------------------------------------------------------------------
/8.0/s2i/bin/save-artifacts:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pushd ${HOME} >/dev/null
3 | tar cf - vendor
4 | popd >/dev/null
5 |
--------------------------------------------------------------------------------
/8.1/s2i/bin/save-artifacts:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pushd ${HOME} >/dev/null
3 | tar cf - vendor
4 | popd >/dev/null
5 |
--------------------------------------------------------------------------------
/8.2/s2i/bin/save-artifacts:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pushd ${HOME} >/dev/null
3 | tar cf - vendor
4 | popd >/dev/null
5 |
--------------------------------------------------------------------------------
/8.3/s2i/bin/save-artifacts:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pushd ${HOME} >/dev/null
3 | tar cf - vendor
4 | popd >/dev/null
5 |
--------------------------------------------------------------------------------
/8.1/README.md:
--------------------------------------------------------------------------------
1 | PHP 8.1 container image
2 | =======================
3 |
4 | **The PHP 8.1 image is deprecated.**
5 |
--------------------------------------------------------------------------------
/test/test-app/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "monolog/monolog": "1.0.*"
4 | }
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "common"]
2 | path = common
3 | url = https://github.com/sclorg/container-common-scripts.git
4 |
--------------------------------------------------------------------------------
/7.4/root/usr/share/container-scripts/php/httpd-cnf/00-documentroot.conf:
--------------------------------------------------------------------------------
1 | DocumentRoot "/opt/app-root/src${DOCUMENTROOT}"
2 |
--------------------------------------------------------------------------------
/8.0/root/usr/share/container-scripts/php/httpd-cnf/00-documentroot.conf:
--------------------------------------------------------------------------------
1 | DocumentRoot "/opt/app-root/src${DOCUMENTROOT}"
2 |
--------------------------------------------------------------------------------
/8.1/root/usr/share/container-scripts/php/httpd-cnf/00-documentroot.conf:
--------------------------------------------------------------------------------
1 | DocumentRoot "/opt/app-root/src${DOCUMENTROOT}"
2 |
--------------------------------------------------------------------------------
/8.2/root/usr/share/container-scripts/php/httpd-cnf/00-documentroot.conf:
--------------------------------------------------------------------------------
1 | DocumentRoot "/opt/app-root/src${DOCUMENTROOT}"
2 |
--------------------------------------------------------------------------------
/8.3/root/usr/share/container-scripts/php/httpd-cnf/00-documentroot.conf:
--------------------------------------------------------------------------------
1 | DocumentRoot "/opt/app-root/src${DOCUMENTROOT}"
2 |
--------------------------------------------------------------------------------
/7.4/root/usr/share/container-scripts/php/post-assemble/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs
5 |
--------------------------------------------------------------------------------
/8.0/root/usr/share/container-scripts/php/post-assemble/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs
5 |
--------------------------------------------------------------------------------
/8.1/root/usr/share/container-scripts/php/post-assemble/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs
5 |
--------------------------------------------------------------------------------
/8.2/root/usr/share/container-scripts/php/post-assemble/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs
5 |
--------------------------------------------------------------------------------
/8.3/root/usr/share/container-scripts/php/post-assemble/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.version
2 |
3 | # help.1 files complied by container-common-scripts from README.md files
4 | */root/help.1
5 |
6 | # .image-id files are generated by common.mk (common subproject)
7 | .image-id*
8 |
--------------------------------------------------------------------------------
/7.4/root/usr/share/container-scripts/php/pre-start/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs ${APP_ROOT}/src
5 |
--------------------------------------------------------------------------------
/8.0/root/usr/share/container-scripts/php/pre-start/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs ${APP_ROOT}/src
5 |
--------------------------------------------------------------------------------
/8.1/root/usr/share/container-scripts/php/pre-start/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs ${APP_ROOT}/src
5 |
--------------------------------------------------------------------------------
/8.2/root/usr/share/container-scripts/php/pre-start/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs ${APP_ROOT}/src
5 |
--------------------------------------------------------------------------------
/8.3/root/usr/share/container-scripts/php/pre-start/40-ssl-certs.sh:
--------------------------------------------------------------------------------
1 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
2 |
3 | # Copy SSL files provided in application source
4 | process_ssl_certs ${APP_ROOT}/src
5 |
--------------------------------------------------------------------------------
/8.0/root/usr/share/container-scripts/php/pre-start/60-fpm.sh:
--------------------------------------------------------------------------------
1 | if [ -d "/run/php-fpm" ]; then
2 | log_info "Starting FPM - pre-start"
3 | /usr/sbin/php-fpm --daemonize
4 | else
5 | log_info "Using mod_php"
6 | fi
7 |
--------------------------------------------------------------------------------
/8.1/root/usr/share/container-scripts/php/pre-start/60-fpm.sh:
--------------------------------------------------------------------------------
1 | if [ -d "/run/php-fpm" ]; then
2 | log_info "Starting FPM - pre-start"
3 | /usr/sbin/php-fpm --daemonize
4 | else
5 | log_info "Using mod_php"
6 | fi
7 |
--------------------------------------------------------------------------------
/8.2/root/usr/share/container-scripts/php/pre-start/60-fpm.sh:
--------------------------------------------------------------------------------
1 | if [ -d "/run/php-fpm" ]; then
2 | log_info "Starting FPM - pre-start"
3 | /usr/sbin/php-fpm --daemonize
4 | else
5 | log_info "Using mod_php"
6 | fi
7 |
--------------------------------------------------------------------------------
/8.3/root/usr/share/container-scripts/php/pre-start/60-fpm.sh:
--------------------------------------------------------------------------------
1 | if [ -d "/run/php-fpm" ]; then
2 | log_info "Starting FPM - pre-start"
3 | /usr/sbin/php-fpm --daemonize
4 | else
5 | log_info "Using mod_php"
6 | fi
7 |
--------------------------------------------------------------------------------
/test/test-app/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | Test PHP passed
4 |
5 |
6 | PHP is working
7 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/7.4/root/usr/share/container-scripts/php/pre-start/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.0/root/usr/share/container-scripts/php/pre-start/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.1/root/usr/share/container-scripts/php/pre-start/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.2/root/usr/share/container-scripts/php/pre-start/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.3/root/usr/share/container-scripts/php/pre-start/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/7.4/root/usr/share/container-scripts/php/post-assemble/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.0/root/usr/share/container-scripts/php/post-assemble/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.1/root/usr/share/container-scripts/php/post-assemble/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.2/root/usr/share/container-scripts/php/post-assemble/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/8.3/root/usr/share/container-scripts/php/post-assemble/20-copy-config.sh:
--------------------------------------------------------------------------------
1 | # additional arbitrary httpd configuration provided by user using s2i
2 |
3 | log_info 'Processing additional arbitrary httpd configuration provided by s2i ...'
4 |
5 | process_extending_config_files ${APP_DATA}/httpd-cfg/ ${PHP_CONTAINER_SCRIPTS_PATH}/httpd-cnf/
6 |
7 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | version: 2
4 | updates:
5 | - package-ecosystem: gitsubmodule
6 | directory: /
7 | schedule:
8 | interval: weekly
9 | labels:
10 | - 'ready for review'
11 | - package-ecosystem: github-actions
12 | directory: /
13 | schedule:
14 | interval: monthly
15 | labels:
16 | - 'ready for review'
17 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Include common Makefile code.
2 | BASE_IMAGE_NAME = php
3 | VERSIONS = 7.4 8.0 8.2 8.3
4 | OPENSHIFT_NAMESPACES =
5 |
6 | # HACK: Ensure that 'git pull' for old clones doesn't cause confusion.
7 | # New clones should use '--recursive'.
8 | .PHONY: $(shell test -f common/common.mk || echo >&2 'Please do "git submodule update --init" first.')
9 |
10 | include common/common.mk
11 |
--------------------------------------------------------------------------------
/test/run-openshift-pytest:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # IMAGE_NAME specifies a name of the candidate image used for testing.
4 | # The image has to be available before this script is executed.
5 | # VERSION specifies the major version of the MariaDB in format of X.Y
6 | # OS specifies RHEL version (e.g. OS=rhel7)
7 | #
8 |
9 | THISDIR=$(dirname ${BASH_SOURCE[0]})
10 |
11 | cd "${THISDIR}" && python3.12 -m pytest -s -rA --showlocals -vv test_ocp_*.py
12 |
--------------------------------------------------------------------------------
/test/run-pytest:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # IMAGE_NAME specifies a name of the candidate image used for testing.
4 | # The image has to be available before this script is executed.
5 | # SINGLE_VERSION specifies the major version of httpd
6 | # OS specifies RHEL version (e.g. OS=rhel8)
7 | #
8 |
9 | THISDIR=$(dirname ${BASH_SOURCE[0]})
10 |
11 | PYTHON_VERSION="3.12"
12 | if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then
13 | PYTHON_VERSION="3.13"
14 | fi
15 | cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py
16 |
--------------------------------------------------------------------------------
/.github/workflows/container-tests.yml:
--------------------------------------------------------------------------------
1 | on:
2 | issue_comment:
3 | types:
4 | - created
5 | jobs:
6 | check-readme:
7 | uses: "sclorg/ci-actions/.github/workflows/check-readme.yml@main"
8 | container-tests:
9 | needs: check-readme
10 | uses: "sclorg/ci-actions/.github/workflows/container-tests.yml@main"
11 | with:
12 | enabled-tests: '["container","container-pytest","openshift-4","openshift-pytest"]'
13 | versions: '[ "7.4", "8.0", "8.2", "8.3" ]'
14 | openshift-versions: '[ "7.4", "8.0", "8.2", "8.3" ]'
15 | secrets: inherit
16 |
--------------------------------------------------------------------------------
/test/test_ocp_php_latest_imagestreams.py:
--------------------------------------------------------------------------------
1 | from container_ci_suite.imagestreams import ImageStreamChecker
2 |
3 | from conftest import VARS
4 |
5 |
6 | class TestLatestImagestreams:
7 |
8 | def setup_method(self):
9 | self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR.parent.parent)
10 |
11 | def test_latest_imagestream(self):
12 | """
13 | Test checks if local imagestreams are the latest one
14 | """
15 | self.latest_version = self.isc.get_latest_version()
16 | assert self.latest_version
17 | self.isc.check_imagestreams(self.latest_version)
18 |
--------------------------------------------------------------------------------
/examples/from-dockerfile/README.md:
--------------------------------------------------------------------------------
1 | Dockerfile examples
2 | ===================
3 |
4 | This directory contains example Dockerfiles that demonstrate how to use the image with a Dockerfile and `podman build`.
5 |
6 | For demonstration, we use an application code available at https://github.com/sclorg/cakephp-ex.git.
7 |
8 | Pull the source to the local machine first:
9 | ```
10 | git clone https://github.com/sclorg/cakephp-ex.git app-src
11 | ```
12 |
13 | Then, build a new image from a Dockerfile in this directory:
14 | ```
15 | podman build -f Dockerfile -t cakephp-app .
16 | ```
17 |
18 | And run the resulting image with the final application:
19 | ```
20 | podman run -ti --rm cakephp-app
21 | ```
22 |
23 |
--------------------------------------------------------------------------------
/7.4/root/usr/share/container-scripts/php/httpd-cnf/50-mpm-tuning.conf:
--------------------------------------------------------------------------------
1 |
2 | # This value should mirror what is set in MinSpareServers.
3 | StartServers ${HTTPD_START_SERVERS}
4 | MinSpareServers ${HTTPD_START_SERVERS}
5 | MaxSpareServers ${HTTPD_MAX_SPARE_SERVERS}
6 | # The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served.
7 | # The default value, when no Cgroup limits are set is 256.
8 | MaxRequestWorkers ${HTTPD_MAX_REQUEST_WORKERS}
9 | ServerLimit ${HTTPD_MAX_REQUEST_WORKERS}
10 | MaxRequestsPerChild ${HTTPD_MAX_REQUESTS_PER_CHILD}
11 | MaxKeepAliveRequests ${HTTPD_MAX_KEEPALIVE_REQUESTS}
12 |
13 |
--------------------------------------------------------------------------------
/8.0/root/usr/share/container-scripts/php/httpd-cnf/50-mpm-tuning.conf:
--------------------------------------------------------------------------------
1 |
2 | # This value should mirror what is set in MinSpareServers.
3 | StartServers ${HTTPD_START_SERVERS}
4 | MinSpareServers ${HTTPD_START_SERVERS}
5 | MaxSpareServers ${HTTPD_MAX_SPARE_SERVERS}
6 | # The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served.
7 | # The default value, when no Cgroup limits are set is 256.
8 | MaxRequestWorkers ${HTTPD_MAX_REQUEST_WORKERS}
9 | ServerLimit ${HTTPD_MAX_REQUEST_WORKERS}
10 | MaxRequestsPerChild ${HTTPD_MAX_REQUESTS_PER_CHILD}
11 | MaxKeepAliveRequests ${HTTPD_MAX_KEEPALIVE_REQUESTS}
12 |
13 |
--------------------------------------------------------------------------------
/8.1/root/usr/share/container-scripts/php/httpd-cnf/50-mpm-tuning.conf:
--------------------------------------------------------------------------------
1 |
2 | # This value should mirror what is set in MinSpareServers.
3 | StartServers ${HTTPD_START_SERVERS}
4 | MinSpareServers ${HTTPD_START_SERVERS}
5 | MaxSpareServers ${HTTPD_MAX_SPARE_SERVERS}
6 | # The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served.
7 | # The default value, when no Cgroup limits are set is 256.
8 | MaxRequestWorkers ${HTTPD_MAX_REQUEST_WORKERS}
9 | ServerLimit ${HTTPD_MAX_REQUEST_WORKERS}
10 | MaxRequestsPerChild ${HTTPD_MAX_REQUESTS_PER_CHILD}
11 | MaxKeepAliveRequests ${HTTPD_MAX_KEEPALIVE_REQUESTS}
12 |
13 |
--------------------------------------------------------------------------------
/8.2/root/usr/share/container-scripts/php/httpd-cnf/50-mpm-tuning.conf:
--------------------------------------------------------------------------------
1 |
2 | # This value should mirror what is set in MinSpareServers.
3 | StartServers ${HTTPD_START_SERVERS}
4 | MinSpareServers ${HTTPD_START_SERVERS}
5 | MaxSpareServers ${HTTPD_MAX_SPARE_SERVERS}
6 | # The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served.
7 | # The default value, when no Cgroup limits are set is 256.
8 | MaxRequestWorkers ${HTTPD_MAX_REQUEST_WORKERS}
9 | ServerLimit ${HTTPD_MAX_REQUEST_WORKERS}
10 | MaxRequestsPerChild ${HTTPD_MAX_REQUESTS_PER_CHILD}
11 | MaxKeepAliveRequests ${HTTPD_MAX_KEEPALIVE_REQUESTS}
12 |
13 |
--------------------------------------------------------------------------------
/8.3/root/usr/share/container-scripts/php/httpd-cnf/50-mpm-tuning.conf:
--------------------------------------------------------------------------------
1 |
2 | # This value should mirror what is set in MinSpareServers.
3 | StartServers ${HTTPD_START_SERVERS}
4 | MinSpareServers ${HTTPD_START_SERVERS}
5 | MaxSpareServers ${HTTPD_MAX_SPARE_SERVERS}
6 | # The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served.
7 | # The default value, when no Cgroup limits are set is 256.
8 | MaxRequestWorkers ${HTTPD_MAX_REQUEST_WORKERS}
9 | ServerLimit ${HTTPD_MAX_REQUEST_WORKERS}
10 | MaxRequestsPerChild ${HTTPD_MAX_REQUESTS_PER_CHILD}
11 | MaxKeepAliveRequests ${HTTPD_MAX_KEEPALIVE_REQUESTS}
12 |
13 |
--------------------------------------------------------------------------------
/7.4/s2i/bin/usage:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
4 | NAMESPACE=sclorg
5 | if [[ $DISTRO =~ rhel* ]]; then
6 | NAMESPACE=rhel10
7 | DISTRO=""
8 | else
9 | DISTRO="-c10s"
10 | fi
11 |
12 | cat < -- curl 127.0.0.1:8080
23 |
24 | Alternatively, to run the image directly using podman or docker, or how to use it as a parent image in a Dockerfile, see documentation at
25 | https://github.com/sclorg/s2i-php-container/blob/master/${PHP_VERSION}/README.md
26 | EOF
27 |
--------------------------------------------------------------------------------
/8.0/s2i/bin/usage:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
4 | NAMESPACE=sclorg
5 | if [[ $DISTRO =~ rhel* ]]; then
6 | NAMESPACE=rhel10
7 | DISTRO=""
8 | else
9 | DISTRO="-c10s"
10 | fi
11 |
12 | cat < -- curl 127.0.0.1:8080
23 |
24 | Alternatively, to run the image directly using podman or docker, or how to use it as a parent image in a Dockerfile, see documentation at
25 | https://github.com/sclorg/s2i-php-container/blob/master/${PHP_VERSION}/README.md
26 | EOF
27 |
--------------------------------------------------------------------------------
/8.1/s2i/bin/usage:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
4 | NAMESPACE=sclorg
5 | if [[ $DISTRO =~ rhel* ]]; then
6 | NAMESPACE=rhel10
7 | DISTRO=""
8 | else
9 | DISTRO="-c10s"
10 | fi
11 |
12 | cat < -- curl 127.0.0.1:8080
23 |
24 | Alternatively, to run the image directly using podman or docker, or how to use it as a parent image in a Dockerfile, see documentation at
25 | https://github.com/sclorg/s2i-php-container/blob/master/${PHP_VERSION}/README.md
26 | EOF
27 |
--------------------------------------------------------------------------------
/8.2/s2i/bin/usage:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
4 | NAMESPACE=sclorg
5 | if [[ $DISTRO =~ rhel* ]]; then
6 | NAMESPACE=rhel10
7 | DISTRO=""
8 | else
9 | DISTRO="-c10s"
10 | fi
11 |
12 | cat < -- curl 127.0.0.1:8080
23 |
24 | Alternatively, to run the image directly using podman or docker, or how to use it as a parent image in a Dockerfile, see documentation at
25 | https://github.com/sclorg/s2i-php-container/blob/master/${PHP_VERSION}/README.md
26 | EOF
27 |
--------------------------------------------------------------------------------
/8.3/s2i/bin/usage:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
4 | NAMESPACE=sclorg
5 | if [[ $DISTRO =~ rhel* ]]; then
6 | NAMESPACE=rhel10
7 | DISTRO=""
8 | else
9 | DISTRO="-c10s"
10 | fi
11 |
12 | cat < -- curl 127.0.0.1:8080
23 |
24 | Alternatively, to run the image directly using podman or docker, or how to use it as a parent image in a Dockerfile, see documentation at
25 | https://github.com/sclorg/s2i-php-container/blob/master/${PHP_VERSION}/README.md
26 | EOF
27 |
--------------------------------------------------------------------------------
/.github/workflows/pr-metadata.yml:
--------------------------------------------------------------------------------
1 | name: Gather Pull Request Metadata
2 | on:
3 | pull_request:
4 | types: [ opened, reopened, synchronize ]
5 | branches: [ master ]
6 |
7 | permissions:
8 | contents: read
9 |
10 | jobs:
11 | gather-metadata:
12 | if: github.repository_owner == 'sclorg'
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - name: Repository checkout
17 | uses: actions/checkout@v6
18 |
19 | - id: Metadata
20 | name: Gather Pull Request Metadata
21 | uses: redhat-plumbers-in-action/gather-pull-request-metadata@v1
22 |
23 | - name: Upload artifact with gathered metadata
24 | uses: actions/upload-artifact@v5
25 | with:
26 | name: pr-metadata
27 | path: ${{ steps.Metadata.outputs.metadata-file }}
28 |
--------------------------------------------------------------------------------
/examples/from-dockerfile/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubi8/php-73
2 |
3 | USER 0
4 | # Add application sources
5 | ADD app-src .
6 | RUN chown -R 1001:0 .
7 | USER 1001
8 |
9 | # Install the dependencies
10 | RUN TEMPFILE=$(mktemp) && \
11 | curl -o "$TEMPFILE" "https://getcomposer.org/installer" && \
12 | php <"$TEMPFILE" && \
13 | ./composer.phar install --no-interaction --no-ansi --optimize-autoloader
14 |
15 | # Run script uses standard ways to configure the PHP application
16 | # and execs httpd -D FOREGROUND at the end
17 | # See more in /s2i/bin/run in this repository.
18 | # Shortly what the run script does: The httpd daemon and php needs to be
19 | # configured, so this script prepares the configuration based on the container
20 | # parameters (e.g. available memory) and puts the configuration files into
21 | # the approriate places.
22 | # This can obviously be done differently, and in that case, the final CMD
23 | # should be set to "CMD httpd -D FOREGROUND" instead.
24 | CMD /usr/libexec/s2i/run
25 |
--------------------------------------------------------------------------------
/test/test_ocp_php_s2i_integration.py:
--------------------------------------------------------------------------------
1 | from container_ci_suite.openshift import OpenShiftAPI
2 |
3 | from conftest import VARS
4 |
5 |
6 | class TestS2IPHPTemplate:
7 |
8 | def setup_method(self):
9 | self.oc_api = OpenShiftAPI(pod_name_prefix=f"php-{VARS.SHORT_VERSION}-testing", version=VARS.VERSION)
10 |
11 | def teardown_method(self):
12 | self.oc_api.delete_project()
13 |
14 | def test_php_template_inside_cluster(self):
15 | """
16 | Test checks if local repository with properly with `test/test-app`
17 | response is as expected
18 | """
19 | service_name = f"php-{VARS.SHORT_VERSION}-testing"
20 | assert self.oc_api.deploy_s2i_app(
21 | image_name=VARS.IMAGE_NAME, app="https://github.com/sclorg/s2i-php-container.git",
22 | context="test/test-app",
23 | service_name=service_name
24 | )
25 | assert self.oc_api.is_template_deployed(name_in_template=service_name, timeout=480)
26 | assert self.oc_api.check_response_inside_cluster(
27 | name_in_template=service_name, expected_output="Test PHP passed"
28 | )
29 |
--------------------------------------------------------------------------------
/test/conftest.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 |
4 | from pathlib import Path
5 | from collections import namedtuple
6 | from pytest import skip
7 |
8 | from container_ci_suite.utils import check_variables
9 |
10 | if not check_variables():
11 | sys.exit(1)
12 |
13 | TAGS = {
14 | "rhel8": "-ubi8",
15 | "rhel9": "-ubi9",
16 | "rhel10": "-ubi10",
17 | }
18 |
19 | Vars = namedtuple(
20 | "Vars", [
21 | "OS", "TAG", "VERSION", "IMAGE_NAME",
22 | "SHORT_VERSION", "TEST_DIR", "BRANCH_TO_TEST", "CHECK_MSG"
23 | ]
24 | )
25 | VERSION = os.getenv("VERSION")
26 | OS = os.getenv("TARGET").lower()
27 |
28 | BRANCH_TO_TEST = "4.X"
29 | if VERSION == "8.2" or VERSION == "8.3":
30 | BRANCH_TO_TEST = "5.X"
31 |
32 | VARS = Vars(
33 | OS=OS,
34 | TAG=TAGS.get(OS),
35 | VERSION=VERSION,
36 | IMAGE_NAME=os.getenv("IMAGE_NAME"),
37 | SHORT_VERSION=VERSION.replace(".", ""),
38 | TEST_DIR=Path(__file__).parent.absolute(),
39 | BRANCH_TO_TEST=BRANCH_TO_TEST,
40 | CHECK_MSG="Welcome to CakePHP",
41 | )
42 |
43 |
44 | def skip_clear_env_tests():
45 | if VARS.OS == "rhel8" and VERSION == "8.2":
46 | skip(f"Skipping clear env tests for {VARS.VERSION} on {VARS.OS}.")
47 |
--------------------------------------------------------------------------------
/.github/workflows/auto-merge.yml:
--------------------------------------------------------------------------------
1 | name: Auto Merge
2 | on:
3 | workflow_run:
4 | workflows: [ Gather Pull Request Metadata ]
5 | types:
6 | - completed
7 |
8 | permissions:
9 | contents: read
10 |
11 | jobs:
12 | download-metadata:
13 | if: >
14 | github.event.workflow_run.event == 'pull_request' &&
15 | github.event.workflow_run.conclusion == 'success'
16 | runs-on: ubuntu-latest
17 |
18 | outputs:
19 | pr-metadata: ${{ steps.Artifact.outputs.pr-metadata-json }}
20 |
21 | steps:
22 | - id: Artifact
23 | name: Download Artifact
24 | uses: redhat-plumbers-in-action/download-artifact@v1
25 | with:
26 | name: pr-metadata
27 |
28 | auto-merge:
29 | needs: [ download-metadata ]
30 | runs-on: ubuntu-latest
31 |
32 | permissions:
33 | # required for merging PRs
34 | contents: write
35 | # required for PR comments and setting labels
36 | pull-requests: write
37 |
38 | steps:
39 | - name: Auto Merge wrapper
40 | uses: sclorg/auto-merge-wrapper@v1
41 | with:
42 | pr-metadata: ${{ needs.download-metadata.outputs.pr-metadata }}
43 | token: ${{ secrets.GITHUB_TOKEN }}
44 |
--------------------------------------------------------------------------------
/test/run-openshift-remote-cluster:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Test the PHP S2I image in OpenShift (remote cluster)
4 | #
5 | # IMAGE_NAME specifies a name of the candidate image used for testing.
6 | # The image has to be available before this script is executed.
7 | # VERSION specifies the major version of the PHP runtime in format of X.Y
8 | # OS specifies RHEL version (e.g. OS=rhel8)
9 | #
10 |
11 | THISDIR=$(dirname ${BASH_SOURCE[0]})
12 |
13 | source "${THISDIR}/test-lib-php.sh"
14 | source "${THISDIR}/test-lib-openshift.sh"
15 | source "${THISDIR}/test-lib-remote-openshift.sh"
16 |
17 | TEST_LIST="\
18 | test_php_integration
19 | test_php_imagestream
20 | test_php_template
21 | test_latest_imagestreams
22 | "
23 |
24 | trap ct_os_cleanup EXIT SIGINT
25 |
26 | ct_os_check_compulsory_vars || exit $OC_ERR
27 |
28 | ct_os_set_ocp4 || exit $OC_ERR
29 |
30 | oc version
31 |
32 | ct_os_check_login || exit $OC_ERR
33 |
34 | ct_os_tag_image_for_cvp "php"
35 |
36 | set -u
37 |
38 | # For testing on OpenShift 4 we use OpenShift internal registry
39 | export CT_OCP4_TEST=true
40 |
41 | TEST_SUMMARY=''
42 | TEST_SET=${TESTS:-$TEST_LIST} ct_run_tests_from_testset "openshift-remote-cluster"
43 | # vim: set tabstop=2:shiftwidth=2:expandtab:
44 |
45 |
--------------------------------------------------------------------------------
/examples/from-dockerfile/Dockerfile.s2i:
--------------------------------------------------------------------------------
1 | FROM registry.access.redhat.com/ubi8/php-73
2 |
3 | # This image supports the Source-to-Image
4 | # (see more at https://docs.openshift.com/container-platform/3.11/creating_images/s2i.html).
5 | # In order to support the Source-to-Image framework, there are some interesting
6 | # scripts inside the builder image, that can be run in a Dockerfile directly as well:
7 | # * The `/usr/libexec/s2i/assemble` script inside the image is run in order
8 | # to produce a new image with the application artifacts.
9 | # The script takes sources of a given application and places them into
10 | # appropriate directories inside the image.
11 | # * The `/usr/libexec/s2i/run` script executes the application and is set as
12 | # a default command in the resulting container image.
13 |
14 | # Add application sources to a directory that the assemble script expects them
15 | # and set permissions so that the container runs without root access
16 | USER 0
17 | ADD app-src /tmp/src
18 | RUN chown -R 1001:0 /tmp/src
19 | USER 1001
20 |
21 | # Let the assemble script to install the dependencies
22 | RUN /usr/libexec/s2i/assemble
23 |
24 | # Run script uses standard ways to run the application
25 | CMD /usr/libexec/s2i/run
26 |
--------------------------------------------------------------------------------
/test/test_ocp_php_s2i_imagestreams.py:
--------------------------------------------------------------------------------
1 | from container_ci_suite.openshift import OpenShiftAPI
2 |
3 | from conftest import VARS
4 |
5 |
6 | class TestPHPImagestreams:
7 |
8 | def setup_method(self):
9 | self.oc_api = OpenShiftAPI(pod_name_prefix="php", version=VARS.VERSION)
10 |
11 | def teardown_method(self):
12 | self.oc_api.delete_project()
13 |
14 | def test_php_template_inside_cluster(self):
15 | """
16 | Test checks if local repository with properly with `test/test-app`
17 | response is as expected.
18 | The imagestreams are used from this repository
19 | """
20 | service_name = f"php-{VARS.SHORT_VERSION}-testing"
21 | assert self.oc_api.deploy_imagestream_s2i(
22 | imagestream_file="imagestreams/php-rhel.json",
23 | image_name=VARS.IMAGE_NAME,
24 | app="https://github.com/sclorg/s2i-php-container.git",
25 | context="test/test-app",
26 | service_name=service_name
27 | )
28 | assert self.oc_api.is_template_deployed(name_in_template=service_name, timeout=480)
29 | assert self.oc_api.check_response_inside_cluster(
30 | name_in_template=service_name, expected_output="Test PHP passed"
31 | )
32 |
--------------------------------------------------------------------------------
/examples/self-signed-ssl/httpd-ssl/certs/server-cert-selfsigned.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDWjCCAkKgAwIBAgIJAI4x7HuBG49oMA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNV
3 | BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
4 | Q29tcGFueSBMdGQwHhcNMTcxMjAzMjMzMzU3WhcNMTgwMTAyMjMzMzU3WjBCMQsw
5 | CQYDVQQGEwJYWDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
6 | dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
7 | vH4Vdq0a3UWUQd8Z6s2csxhxjAOyUx0rszGL0m3uTjQido6JRBdjN2dXiZc3LFoq
8 | YeOKR3CeHsn7UdrlzaboHFDfjAaextse0740mB1g14H1bAS0POuTPeKa+3wGfzCb
9 | sTSXnfSrICl3n2D/3KSO93WwmS90kBD6HmKt5nfkLpJnROM/4bHmuoV0Ry8CDjzj
10 | mka7pQU4yzyMKLU3sHpncZU6g7o4Vezic9ksVzIAbdPCSbF7ktVz/hisyCuzyKN6
11 | s2327jq593vBgGOsNU5PDPDjKW74Q0Bv/FxPK4nx+o4IkcRW1QEb+yAx8XOM7CDZ
12 | ViKvI/A0b+Y4Y3rIQ465+wIDAQABo1MwUTAdBgNVHQ4EFgQUAY1i6ZNbqO1+46aw
13 | pldCyPaWoYswHwYDVR0jBBgwFoAUAY1i6ZNbqO1+46awpldCyPaWoYswDwYDVR0T
14 | AQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEADhGjnYGq9JvQcygMYEQiIdyS
15 | t06Nu7NUkWz52GJp7WFognWyG+0jAomBR0GSUchfubvVZ7cHIaVKLhiGOqg+HIol
16 | 7tNRfvE6x/Idk674g6OTRAWxO/wOlgnRMpRy6XhHOtb4HcPcpWFZJS8MC8+HRWIs
17 | kzMErXe0/obnKn9O04kcEREfmB7kfcD4ooqk5gwbdQk1W6a44LcN6AB5qYPjOzgF
18 | Qnb2aLQW9XhgNhiMsYqDzCZsy0az0rz7NgkVOnKrGJ8x3kVX13GR2joVVHOazms9
19 | Gd90z+mLMDTbqCRGIPMLvEp4HtAmBxbgsj/zHyinajIqV96B3Cr3zTdW29lHJg==
20 | -----END CERTIFICATE-----
21 |
--------------------------------------------------------------------------------
/imagestreams/imagestreams.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # configuration file for https://github.com/sclorg/ci-scripts/tree/master/ocp-stream-generator
3 |
4 | - name: php
5 | pretty_name: PHP
6 | sample_repo: https://github.com/sclorg/cakephp-ex.git
7 | category: builder
8 | description: >-
9 | Build and run PHP APP_VERSION applications on DISTRO_NAME. For more information
10 | about using this builder image, including OpenShift considerations, see
11 | https://github.com/sclorg/s2i-php-container/blob/master/APP_VERSION/README.md.
12 | imagestream_files:
13 | - filename: php-centos.json
14 | latest: "8.3-ubi10"
15 | distros:
16 | - name: UBI 8
17 | app_versions: ["7.4", "8.2"]
18 |
19 | - name: UBI 9
20 | app_versions: ["8.0", "8.2", "8.3"]
21 |
22 | - name: UBI 10
23 | app_versions: ["8.3"]
24 |
25 | - filename: php-rhel.json
26 | latest: "8.3-ubi10"
27 | distros:
28 | - name: UBI 8
29 | app_versions: ["7.4", "8.2"]
30 |
31 | - name: UBI 9
32 | app_versions: ["8.0", "8.2", "8.3"]
33 |
34 | - name: UBI 10
35 | app_versions: ["8.3"]
36 |
37 | - filename: php-rhel-aarch64.json
38 | latest: "8.3-ubi10"
39 | distros:
40 | - name: UBI 8
41 | app_versions: ["7.4", "8.2"]
42 |
43 | - name: UBI 9
44 | app_versions: ["8.0", "8.2", "8.3"]
45 |
46 | - name: UBI 10
47 | app_versions: ["8.3"]
48 | ...
49 |
--------------------------------------------------------------------------------
/test/test_ocp_shared_helm_cakephp_application.py:
--------------------------------------------------------------------------------
1 | from container_ci_suite.helm import HelmChartsAPI
2 |
3 | from conftest import VARS
4 |
5 |
6 | class TestHelmCakePHPTemplate:
7 |
8 | def setup_method(self):
9 | package_name = "redhat-cakephp-application-template"
10 | self.hc_api = HelmChartsAPI(path=VARS.TEST_DIR, package_name=package_name, tarball_dir=VARS.TEST_DIR)
11 | self.hc_api.clone_helm_chart_repo(
12 | repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts",
13 | subdir="charts/redhat"
14 | )
15 |
16 | def teardown_method(self):
17 | self.hc_api.delete_project()
18 |
19 | def test_by_helm_test(self):
20 | """
21 | Test checks if Helm imagestream and Helm perl dancer application
22 | works properly and response is as expected.
23 | """
24 | self.hc_api.package_name = "redhat-php-imagestreams"
25 | assert self.hc_api.helm_package()
26 | assert self.hc_api.helm_installation()
27 | self.hc_api.package_name = "redhat-cakephp-application-template"
28 | assert self.hc_api.helm_package()
29 | assert self.hc_api.helm_installation(
30 | values={
31 | "php_version": f"{VARS.VERSION}{VARS.TAG}",
32 | "namespace": self.hc_api.namespace,
33 | "source_repository_ref": VARS.BRANCH_TO_TEST,
34 | "name": "cakephp-example"
35 | }
36 | )
37 | assert self.hc_api.is_s2i_pod_running(pod_name_prefix="cakephp-example", timeout=480)
38 | assert self.hc_api.test_helm_chart(expected_str=[VARS.CHECK_MSG])
39 |
--------------------------------------------------------------------------------
/test/test_ocp_php_deploy_templates.py:
--------------------------------------------------------------------------------
1 | from container_ci_suite.openshift import OpenShiftAPI
2 |
3 | from conftest import VARS, skip_clear_env_tests
4 |
5 |
6 | class TestDeployTemplate:
7 |
8 | def setup_method(self):
9 | self.oc_api = OpenShiftAPI(pod_name_prefix=f"php-{VARS.SHORT_VERSION}-testing", version=VARS.VERSION)
10 |
11 | def teardown_method(self):
12 | self.oc_api.delete_project()
13 |
14 | def test_php_template_inside_cluster(self):
15 | """
16 | Test checks if local imagestreams and example application `cakephp-ex` works with properly
17 | and response is as expected
18 | """
19 | skip_clear_env_tests()
20 | self.oc_api.import_is("imagestreams/php-rhel.json", "", skip_check=True)
21 | service_name = f"php-{VARS.SHORT_VERSION}-testing"
22 | template_url = self.oc_api.get_raw_url_for_json(
23 | container="cakephp-ex", dir="openshift/templates", filename="cakephp.json", branch=VARS.BRANCH_TO_TEST
24 | )
25 | openshift_args = [
26 | f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}",
27 | "SOURCE_REPOSITORY_URL=https://github.com/sclorg/cakephp-ex.git",
28 | f"PHP_VERSION={VARS.VERSION}{VARS.TAG}",
29 | f"NAME={service_name}"
30 | ]
31 | assert self.oc_api.deploy_template_with_image(
32 | image_name=VARS.IMAGE_NAME,
33 | template=template_url,
34 | name_in_template="php",
35 | openshift_args=openshift_args
36 | )
37 | assert self.oc_api.is_template_deployed(name_in_template=service_name, timeout=480)
38 | assert self.oc_api.check_response_inside_cluster(
39 | name_in_template=service_name, expected_output=VARS.CHECK_MSG
40 | )
41 |
--------------------------------------------------------------------------------
/test/test_ocp_shared_helm_chart_imagestreams.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | from container_ci_suite.helm import HelmChartsAPI
4 |
5 | from conftest import VARS
6 |
7 |
8 | class TestHelmRHELPHPImageStreams:
9 |
10 | def setup_method(self):
11 | package_name = "redhat-php-imagestreams"
12 | self.hc_api = HelmChartsAPI(
13 | path=VARS.TEST_DIR, package_name=package_name, tarball_dir=VARS.TEST_DIR, shared_cluster=True
14 | )
15 | self.hc_api.clone_helm_chart_repo(
16 | repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts",
17 | subdir="charts/redhat"
18 | )
19 |
20 | def teardown_method(self):
21 | self.hc_api.delete_project()
22 |
23 | @pytest.mark.parametrize(
24 | "version,registry,expected",
25 | [
26 | ("8.3-ubi10", "registry.redhat.io/ubi10/php-83:latest", True),
27 | ("8.3-ubi9", "registry.redhat.io/ubi9/php-83:latest", True),
28 | ("8.2-ubi9", "registry.redhat.io/ubi9/php-82:latest", True),
29 | ("8.2-ubi8", "registry.redhat.io/ubi8/php-82:latest", True),
30 | ("8.1-ubi9", "registry.redhat.io/ubi9/php-81:latest", False),
31 | ("8.0-ubi9", "registry.redhat.io/ubi9/php-80:latest", True),
32 | ("8.0-ubi8", "registry.redhat.io/ubi8/php-80:latest", False),
33 | ("7.4-ubi8", "registry.redhat.io/ubi8/php-74:latest", True),
34 | ],
35 | )
36 | def test_package_imagestream(self, version, registry, expected):
37 | """
38 | Test checks if Helm imagestreams are present
39 | """
40 | assert self.hc_api.helm_package()
41 | assert self.hc_api.helm_installation()
42 | assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected
43 |
--------------------------------------------------------------------------------
/examples/self-signed-ssl/httpd-ssl/private/server-key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC8fhV2rRrdRZRB
3 | 3xnqzZyzGHGMA7JTHSuzMYvSbe5ONCJ2jolEF2M3Z1eJlzcsWiph44pHcJ4eyftR
4 | 2uXNpugcUN+MBp7G2x7TvjSYHWDXgfVsBLQ865M94pr7fAZ/MJuxNJed9KsgKXef
5 | YP/cpI73dbCZL3SQEPoeYq3md+QukmdE4z/hsea6hXRHLwIOPOOaRrulBTjLPIwo
6 | tTewemdxlTqDujhV7OJz2SxXMgBt08JJsXuS1XP+GKzIK7PIo3qzbfbuOrn3e8GA
7 | Y6w1Tk8M8OMpbvhDQG/8XE8rifH6jgiRxFbVARv7IDHxc4zsINlWIq8j8DRv5jhj
8 | eshDjrn7AgMBAAECggEARZxeutxE/pCypv0IqkFS7IVLccTvt2gfemcC1yzIBFOW
9 | oqgTI3Vrq8tbdbHFq3iFDG+m4qlBi+dWDC3GDoPkVoi7dg//1TqZEOO+sqqu2Afj
10 | pge6tIDfeMxWJifwkkpWRURB9hCknhUSW2bMNyUCs3rgREJVTtsmM9CHnoSKXXQL
11 | aOeYXalFVpx3ceK+xdp0VGfpsqEabBKs0yy3EDiQy2huoWce3EVFLVrwx/IkhcsZ
12 | JlI5LPpoiTglSs1g9i88JHS2slBtKtb1lWl/yXHhK1g7s34c6f9jP8snuFE5ddMn
13 | 0L4GDA9teaPGvB533eb2RIFy2kUYgpr5c03G6rpoOQKBgQDpY6BFJkPGENnC5Bdb
14 | fJCuN2nyRdC1qvv6ESFaQYb0s6QjKDqpb0dUSYN3+zNgtiAysbQLeU/d9mmt4UR8
15 | ohjRkOySU0eQ/YNFokjw6g6GPoiMHJJ9cP75NA94uIMIUTY7uHEWWZwXI5UphdPC
16 | p5/3MaF1VlYQys9a5wtiEaDSfQKBgQDOwPV0zQjUabkVQ4yV0amP8xybvHH8ghG0
17 | RMStHg96RfDmg35JQaw22A2xiVROCoZgLqiE1DFSl/3gBF/vfqBh/uzdxwNerJC6
18 | ROdCxyS4rys5d/02P4aNOa73sD+ZKyEZRTF1v3bmOGKidRFF5oxIpuHjFWlJFKx1
19 | O/b3AI0v1wKBgQC/L4N84emm+OrKAfs4UIRckrxRYOulxhmAMkQ2IXOiRP5yZmQX
20 | pDa0TzxJLxhZYxhhLr0koQ3R8CeF7wEhb9AQ7D0/aMU5etLsWhKSd8nKIrPMwyMl
21 | a0kTb5g09kEwsQZSSbcp7eI1+koYp65eyN37q0ZuTnlWbC0MdDQY9APgKQKBgQCb
22 | HqaKNXLUe2XDkGSf2ygOumXSanZS7vt9dsLg59bQ9DyjljBfogglNcBAXTqFOtxK
23 | uXbyAYnn3+U399BKjYSjQXJRioj6tRn4xs2DiooAjlwtx9qQouS+fHLLns54iqVQ
24 | oltTbo00eUV3gcGt4iWKNLrxdxUBIaOqaY0HEMDdDQKBgQCRvcHDF7JSPuBiO3Tw
25 | PSOUD4q6dD/dhI+X2ZKg83w94SZXXms6eMSbedUkLoJ8TDunmdRUUWb6rgP/pJwr
26 | zKRTskItF15i9IWCwC6jBrSfx5n2JcSoBALyc0aR9heF0GQjWwqURd+PC/msomrW
27 | z9SCl8mpQVFtBlui7PcnDLTFAg==
28 | -----END PRIVATE KEY-----
29 |
--------------------------------------------------------------------------------
/test/test_container_basics.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | from container_ci_suite.container_lib import ContainerTestLib
4 | from container_ci_suite.engines.podman_wrapper import PodmanCLIWrapper
5 |
6 | from conftest import VARS
7 |
8 |
9 | class TestPHPContainer:
10 |
11 | def setup_method(self):
12 | self.app = ContainerTestLib(image_name=VARS.IMAGE_NAME, s2i_image=True)
13 |
14 | def teardown_method(self):
15 | self.app.cleanup()
16 |
17 | def test_run_s2i_usage(self):
18 | """
19 | Test if /usr/libexec/s2i/usage works properly
20 | """
21 | output = self.app.s2i_usage()
22 | assert output
23 |
24 | def test_docker_run_usage(self):
25 | """
26 | Test if podman run works properly
27 | """
28 | assert PodmanCLIWrapper.call_podman_command(
29 | cmd=f"run --rm {VARS.IMAGE_NAME} &>/dev/null",
30 | return_output=False
31 | ) == 0
32 |
33 | def test_scl_usage(self):
34 | assert VARS.VERSION in PodmanCLIWrapper.podman_run_command(
35 | f"--rm {VARS.IMAGE_NAME} /bin/bash -c 'php --version'"
36 | )
37 |
38 | @pytest.mark.parametrize(
39 | "dockerfile",
40 | [
41 | "Dockerfile",
42 | "Dockerfile.s2i"
43 | ]
44 | )
45 | def test_dockerfiles(self, dockerfile):
46 | assert self.app.build_test_container(
47 | dockerfile=VARS.TEST_DIR / "examples/from-dockerfile" / dockerfile,
48 | app_url="https://github.com/sclorg/cakephp-ex.git",
49 | app_dir="app-src"
50 | )
51 | assert self.app.test_app_dockerfile()
52 | cip = self.app.get_cip()
53 | assert cip
54 | assert self.app.test_response(
55 | url=cip,
56 | expected_output="Welcome to your CakePHP application on OpenShift",
57 | debug=True
58 | )
59 |
--------------------------------------------------------------------------------
/7.4/root/usr/libexec/container-setup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # In order to drop the root user, we have to make some directories world
6 | # writeable as OpenShift default security model is to run the container under
7 | # random UID.
8 |
9 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
10 |
11 | # compatibility symlinks so we hide SCL paths
12 | if [ -v SCL_ENABLED ] ; then
13 | # /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
14 | mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
15 | ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd
16 |
17 | # /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
18 | mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
19 | ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd
20 |
21 | # /opt/rh/httpd24/root/var/www will be symlink to /var/www
22 | rm -rf /var/www
23 | mv ${HTTPD_DATA_ORIG_PATH} /var/www
24 | ln -s /var/www ${HTTPD_DATA_ORIG_PATH}
25 | else
26 | rm -f /opt/app-root/etc/scl_enable
27 | fi
28 |
29 | if head "/etc/redhat-release" | grep -q -e "^Red Hat Enterprise Linux release 8" -e "Fedora"; then
30 | /usr/libexec/httpd-ssl-gencerts
31 | fi
32 |
33 | mkdir -p ${HTTPD_CONFIGURATION_PATH}
34 | chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
35 | chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}
36 | chmod -R ug+r /etc/pki/tls/certs/localhost.crt
37 | chmod -R ug+r /etc/pki/tls/private/localhost.key
38 | chown -R 1001:0 /etc/pki/tls/certs/localhost.crt
39 | chown -R 1001:0 /etc/pki/tls/private/localhost.key
40 | mkdir -p ${APP_ROOT}/etc
41 | chmod -R a+rwx ${APP_ROOT}/etc
42 | chmod -R a+rwx ${HTTPD_VAR_RUN}
43 | chown -R 1001:0 ${APP_ROOT}
44 | mkdir /tmp/sessions
45 | chmod -R a+rwx /tmp/sessions
46 | chown -R 1001:0 /tmp/sessions
47 | chown -R 1001:0 ${HTTPD_DATA_PATH}
48 | if [ "$PLATFORM" == "el7" ]; then
49 | # Only run for el7 as this essentially becomes "chmod -R /etc" outside of SCL-based images
50 | chmod -R a+rwx "${PHP_SYSCONF_PATH}"
51 | else
52 | chmod a+rwx "${PHP_SYSCONF_PATH}/php.ini"
53 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php.d"
54 | fi
55 |
56 | mkdir -p ${PHP_CONTAINER_SCRIPTS_PATH}/pre-init
57 |
58 | config_general
59 |
60 |
--------------------------------------------------------------------------------
/7.4/s2i/bin/assemble:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
6 |
7 | shopt -s dotglob
8 | echo "---> Installing application source..."
9 | rm -fR /tmp/src/.git
10 | mv /tmp/src/* ./
11 |
12 | # Fix source directory permissions
13 | fix-permissions ./
14 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
15 |
16 | # Change the npm registry mirror if provided
17 | if [ -n "$NPM_MIRROR" ]; then
18 | npm config set registry $NPM_MIRROR
19 | fi
20 |
21 | if [ -f composer.json ]; then
22 | echo "Found 'composer.json', installing dependencies using composer.phar... "
23 |
24 | # Install Composer
25 | TEMPFILE=$(mktemp)
26 | RETRIES=6
27 | for ((i=0; i<$RETRIES; i++)); do
28 |
29 | if [ -z "$COMPOSER_INSTALLER" ]; then
30 | export COMPOSER_INSTALLER="https://getcomposer.org/installer"
31 | fi
32 |
33 | echo "Downloading $COMPOSER_INSTALLER, attempt $((i+1))/$RETRIES"
34 | curl -o $TEMPFILE $COMPOSER_INSTALLER && break
35 | sleep 10
36 | done
37 | if [[ $i == $RETRIES ]]; then
38 | echo "Download failed, giving up."
39 | exit 1
40 | fi
41 |
42 | if [ -z $COMPOSER_VERSION ]; then
43 | echo "By default, latest composer will be used. If you want to use v1 please use the environment variable COMPOSER_VERSION=1"
44 | php <$TEMPFILE
45 | else
46 | echo "You set the COMPOSER_VERSION"
47 | php <$TEMPFILE -- --$COMPOSER_VERSION
48 | fi
49 |
50 | if [ "$(ls -a /tmp/artifacts/ 2>/dev/null)" ]; then
51 | echo "Restoring build artifacts"
52 | mv /tmp/artifacts/* $HOME/
53 | fi
54 |
55 | # Change the repo mirror if provided
56 | if [ -n "$COMPOSER_MIRROR" ]; then
57 | ./composer.phar config -g repositories.packagist composer $COMPOSER_MIRROR
58 | fi
59 |
60 | # Install App dependencies using Composer
61 | ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS
62 |
63 | if [ ! -f composer.lock ]; then
64 | echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n"
65 | fi
66 | fi
67 |
68 | # post-assemble files
69 | process_extending_files ./php-post-assemble/ ${PHP_CONTAINER_SCRIPTS_PATH}/post-assemble/
70 |
71 | # Fix source directory permissions
72 | fix-permissions ./
73 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
74 |
--------------------------------------------------------------------------------
/.github/workflows/build-and-push.yml:
--------------------------------------------------------------------------------
1 | name: Build and push images to Quay.io registry
2 | on:
3 | push:
4 | branches:
5 | - master
6 | schedule:
7 | - cron: '0 1 * * 3'
8 |
9 | jobs:
10 | build-and-push:
11 | if: github.repository_owner == 'sclorg'
12 | runs-on: ubuntu-latest
13 | strategy:
14 | fail-fast: false
15 | matrix:
16 | include:
17 | - dockerfile: "8.2/Dockerfile.fedora"
18 | docker_context: "8.2"
19 | registry_namespace: "fedora"
20 | quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
21 | quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
22 | tag: "8.2"
23 | image_name: "php-82"
24 |
25 | - dockerfile: "8.3/Dockerfile.fedora"
26 | docker_context: "8.3"
27 | registry_namespace: "fedora"
28 | quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
29 | quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
30 | tag: "8.3"
31 | image_name: "php-83"
32 |
33 | - dockerfile: "8.3/Dockerfile.c10s"
34 | docker_context: "8.3"
35 | registry_namespace: "sclorg"
36 | quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
37 | quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
38 | tag: "c10s"
39 | image_name: "php-83-c10s"
40 |
41 | - dockerfile: "8.3/Dockerfile.c9s"
42 | docker_context: "8.3"
43 | registry_namespace: "sclorg"
44 | quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
45 | quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
46 | tag: "c9s"
47 | image_name: "php-83-c9s"
48 |
49 | steps:
50 | - name: Build and push to quay.io registry
51 | uses: sclorg/build-and-push-action@v4
52 | with:
53 | registry: "quay.io"
54 | registry_namespace: ${{ matrix.registry_namespace }}
55 | registry_username: ${{ secrets[matrix.quayio_username] }}
56 | registry_token: ${{ secrets[matrix.quayio_token] }}
57 | dockerfile: ${{ matrix.dockerfile }}
58 | docker_context: ${{ matrix.docker_context }}
59 | tag: ${{ matrix.tag }}
60 | image_name: ${{ matrix.image_name }}
61 | readme: "${{ matrix.docker_context }}/README.md"
62 | quay_application_token: ${{ secrets.QUAY_IMAGE_SCLORG_UPDATE_DESC }}
63 |
--------------------------------------------------------------------------------
/8.0/s2i/bin/assemble:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
6 |
7 | shopt -s dotglob
8 | echo "---> Installing application source..."
9 | rm -fR /tmp/src/.git
10 | mv /tmp/src/* ./
11 |
12 | # Fix source directory permissions
13 | fix-permissions ./
14 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
15 |
16 | # Change the npm registry mirror if provided
17 | if [ -n "$NPM_MIRROR" ]; then
18 | npm config set registry $NPM_MIRROR
19 | fi
20 |
21 | if [ -f composer.json ]; then
22 | echo "Found 'composer.json', installing dependencies using composer.phar... "
23 |
24 | # Install Composer
25 | TEMPFILE=$(mktemp)
26 | RETRIES=6
27 | for ((i=0; i<$RETRIES; i++)); do
28 |
29 | if [ -z "$COMPOSER_INSTALLER" ]; then
30 | export COMPOSER_INSTALLER="https://getcomposer.org/installer"
31 | fi
32 |
33 | echo "Downloading $COMPOSER_INSTALLER, attempt $((i+1))/$RETRIES"
34 | curl -o $TEMPFILE $COMPOSER_INSTALLER && break
35 | sleep 10
36 | done
37 | if [[ $i == $RETRIES ]]; then
38 | echo "Download failed, giving up."
39 | exit 1
40 | fi
41 |
42 | if [ -z $COMPOSER_VERSION ]; then
43 | echo "By default, latest composer will be used. If you want to use v1 please use the environment variable COMPOSER_VERSION=1"
44 | php <$TEMPFILE
45 | else
46 | echo "You set the COMPOSER_VERSION"
47 | php <$TEMPFILE -- --$COMPOSER_VERSION
48 | fi
49 |
50 | if [ "$(ls -a /tmp/artifacts/ 2>/dev/null)" ]; then
51 | echo "Restoring build artifacts"
52 | mv /tmp/artifacts/* $HOME/
53 | fi
54 |
55 | # Change the repo mirror if provided
56 | if [ -n "$COMPOSER_MIRROR" ]; then
57 | ./composer.phar config -g repositories.packagist composer $COMPOSER_MIRROR
58 | fi
59 |
60 | # Install App dependencies using Composer
61 | ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS
62 |
63 | if [ ! -f composer.lock ]; then
64 | echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n"
65 | fi
66 | fi
67 |
68 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
69 | echo "Setting clear_env to no in assemble script"
70 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
71 | fi
72 |
73 | # post-assemble files
74 | process_extending_files ./php-post-assemble/ ${PHP_CONTAINER_SCRIPTS_PATH}/post-assemble/
75 |
76 | # Fix source directory permissions
77 | fix-permissions ./
78 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
79 |
--------------------------------------------------------------------------------
/8.1/s2i/bin/assemble:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
6 |
7 | shopt -s dotglob
8 | echo "---> Installing application source..."
9 | rm -fR /tmp/src/.git
10 | mv /tmp/src/* ./
11 |
12 | # Fix source directory permissions
13 | fix-permissions ./
14 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
15 |
16 | # Change the npm registry mirror if provided
17 | if [ -n "$NPM_MIRROR" ]; then
18 | npm config set registry $NPM_MIRROR
19 | fi
20 |
21 | if [ -f composer.json ]; then
22 | echo "Found 'composer.json', installing dependencies using composer.phar... "
23 |
24 | # Install Composer
25 | TEMPFILE=$(mktemp)
26 | RETRIES=6
27 | for ((i=0; i<$RETRIES; i++)); do
28 |
29 | if [ -z "$COMPOSER_INSTALLER" ]; then
30 | export COMPOSER_INSTALLER="https://getcomposer.org/installer"
31 | fi
32 |
33 | echo "Downloading $COMPOSER_INSTALLER, attempt $((i+1))/$RETRIES"
34 | curl -o $TEMPFILE $COMPOSER_INSTALLER && break
35 | sleep 10
36 | done
37 | if [[ $i == $RETRIES ]]; then
38 | echo "Download failed, giving up."
39 | exit 1
40 | fi
41 |
42 | if [ -z $COMPOSER_VERSION ]; then
43 | echo "By default, latest composer will be used. If you want to use v1 please use the environment variable COMPOSER_VERSION=1"
44 | php <$TEMPFILE
45 | else
46 | echo "You set the COMPOSER_VERSION"
47 | php <$TEMPFILE -- --$COMPOSER_VERSION
48 | fi
49 |
50 | if [ "$(ls -a /tmp/artifacts/ 2>/dev/null)" ]; then
51 | echo "Restoring build artifacts"
52 | mv /tmp/artifacts/* $HOME/
53 | fi
54 |
55 | # Change the repo mirror if provided
56 | if [ -n "$COMPOSER_MIRROR" ]; then
57 | ./composer.phar config -g repositories.packagist composer $COMPOSER_MIRROR
58 | fi
59 |
60 | # Install App dependencies using Composer
61 | ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS
62 |
63 | if [ ! -f composer.lock ]; then
64 | echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n"
65 | fi
66 | fi
67 |
68 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
69 | echo "Setting clear_env to no in assemble script"
70 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
71 | fi
72 |
73 | # post-assemble files
74 | process_extending_files ./php-post-assemble/ ${PHP_CONTAINER_SCRIPTS_PATH}/post-assemble/
75 |
76 | # Fix source directory permissions
77 | fix-permissions ./
78 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
79 |
--------------------------------------------------------------------------------
/8.2/s2i/bin/assemble:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
6 |
7 | shopt -s dotglob
8 | echo "---> Installing application source..."
9 | rm -fR /tmp/src/.git
10 | mv /tmp/src/* ./
11 |
12 | # Fix source directory permissions
13 | fix-permissions ./
14 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
15 |
16 | # Change the npm registry mirror if provided
17 | if [ -n "$NPM_MIRROR" ]; then
18 | npm config set registry $NPM_MIRROR
19 | fi
20 |
21 | if [ -f composer.json ]; then
22 | echo "Found 'composer.json', installing dependencies using composer.phar... "
23 |
24 | # Install Composer
25 | TEMPFILE=$(mktemp)
26 | RETRIES=6
27 | for ((i=0; i<$RETRIES; i++)); do
28 |
29 | if [ -z "$COMPOSER_INSTALLER" ]; then
30 | export COMPOSER_INSTALLER="https://getcomposer.org/installer"
31 | fi
32 |
33 | echo "Downloading $COMPOSER_INSTALLER, attempt $((i+1))/$RETRIES"
34 | curl -o $TEMPFILE $COMPOSER_INSTALLER && break
35 | sleep 10
36 | done
37 | if [[ $i == $RETRIES ]]; then
38 | echo "Download failed, giving up."
39 | exit 1
40 | fi
41 |
42 | if [ -z $COMPOSER_VERSION ]; then
43 | echo "By default, latest composer will be used. If you want to use v1 please use the environment variable COMPOSER_VERSION=1"
44 | php <$TEMPFILE
45 | else
46 | echo "You set the COMPOSER_VERSION"
47 | php <$TEMPFILE -- --$COMPOSER_VERSION
48 | fi
49 |
50 | if [ "$(ls -a /tmp/artifacts/ 2>/dev/null)" ]; then
51 | echo "Restoring build artifacts"
52 | mv /tmp/artifacts/* $HOME/
53 | fi
54 |
55 | # Change the repo mirror if provided
56 | if [ -n "$COMPOSER_MIRROR" ]; then
57 | ./composer.phar config -g repositories.packagist composer $COMPOSER_MIRROR
58 | fi
59 |
60 | # Install App dependencies using Composer
61 | ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS
62 |
63 | if [ ! -f composer.lock ]; then
64 | echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n"
65 | fi
66 | fi
67 |
68 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
69 | echo "Setting clear_env to no in assemble script"
70 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
71 | fi
72 |
73 | # post-assemble files
74 | process_extending_files ./php-post-assemble/ ${PHP_CONTAINER_SCRIPTS_PATH}/post-assemble/
75 |
76 | # Fix source directory permissions
77 | fix-permissions ./
78 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
79 |
--------------------------------------------------------------------------------
/8.3/s2i/bin/assemble:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
6 |
7 | shopt -s dotglob
8 | echo "---> Installing application source..."
9 | rm -fR /tmp/src/.git
10 | mv /tmp/src/* ./
11 |
12 | # Fix source directory permissions
13 | fix-permissions ./
14 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
15 |
16 | # Change the npm registry mirror if provided
17 | if [ -n "$NPM_MIRROR" ]; then
18 | npm config set registry $NPM_MIRROR
19 | fi
20 |
21 | if [ -f composer.json ]; then
22 | echo "Found 'composer.json', installing dependencies using composer.phar... "
23 |
24 | # Install Composer
25 | TEMPFILE=$(mktemp)
26 | RETRIES=6
27 | for ((i=0; i<$RETRIES; i++)); do
28 |
29 | if [ -z "$COMPOSER_INSTALLER" ]; then
30 | export COMPOSER_INSTALLER="https://getcomposer.org/installer"
31 | fi
32 |
33 | echo "Downloading $COMPOSER_INSTALLER, attempt $((i+1))/$RETRIES"
34 | curl -o $TEMPFILE $COMPOSER_INSTALLER && break
35 | sleep 10
36 | done
37 | if [[ $i == $RETRIES ]]; then
38 | echo "Download failed, giving up."
39 | exit 1
40 | fi
41 |
42 | if [ -z $COMPOSER_VERSION ]; then
43 | echo "By default, latest composer will be used. If you want to use v1 please use the environment variable COMPOSER_VERSION=1"
44 | php <$TEMPFILE
45 | else
46 | echo "You set the COMPOSER_VERSION"
47 | php <$TEMPFILE -- --$COMPOSER_VERSION
48 | fi
49 |
50 | if [ "$(ls -a /tmp/artifacts/ 2>/dev/null)" ]; then
51 | echo "Restoring build artifacts"
52 | mv /tmp/artifacts/* $HOME/
53 | fi
54 |
55 | # Change the repo mirror if provided
56 | if [ -n "$COMPOSER_MIRROR" ]; then
57 | ./composer.phar config -g repositories.packagist composer $COMPOSER_MIRROR
58 | fi
59 |
60 | # Install App dependencies using Composer
61 | ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS
62 |
63 | if [ ! -f composer.lock ]; then
64 | echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n"
65 | fi
66 | fi
67 |
68 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
69 | echo "Setting clear_env to no in assemble script"
70 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
71 | fi
72 |
73 | # post-assemble files
74 | process_extending_files ./php-post-assemble/ ${PHP_CONTAINER_SCRIPTS_PATH}/post-assemble/
75 |
76 | # Fix source directory permissions
77 | fix-permissions ./
78 | fix-permissions ${HTTPD_CONFIGURATION_PATH}
79 |
--------------------------------------------------------------------------------
/test/test-lib-php.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Functions for tests for the PHP image in OpenShift.
4 | #
5 | # IMAGE_NAME specifies a name of the candidate image used for testing.
6 | # The image has to be available before this script is executed.
7 | #
8 |
9 | THISDIR=$(dirname ${BASH_SOURCE[0]})
10 |
11 | source "${THISDIR}/test-lib.sh"
12 | source "${THISDIR}/test-lib-openshift.sh"
13 |
14 | function test_php_integration() {
15 | ct_os_test_s2i_app "${IMAGE_NAME}" \
16 | "https://github.com/sclorg/s2i-php-container.git" \
17 | "test/test-app" \
18 | "Test PHP passed"
19 | }
20 |
21 | # Check the imagestream
22 | function test_php_imagestream() {
23 | ct_os_test_image_stream_s2i "${THISDIR}/imagestreams/php-${OS//[0-9]/}.json" "${IMAGE_NAME}" \
24 | "https://github.com/sclorg/s2i-php-container.git" \
25 | test/test-app \
26 | "Test PHP passed"
27 | }
28 |
29 | # Check the template
30 | function test_php_template() {
31 | local supported_use_case
32 | local check_msg
33 | if [ "${VERSION}" == "7.4" ] || [ "${VERSION}" == "8.0" ]; then
34 | supported_use_case="True"
35 | BRANCH_TO_TEST="4.X"
36 | check_msg="Welcome to CakePHP 4.5"
37 | # Version 8.1 is supported only for RHEL9
38 | elif [ "${VERSION}" == "8.2" ] || [ "${VERSION}" == "8.3" ]; then
39 | supported_use_case="True"
40 | BRANCH_TO_TEST="5.X"
41 | check_msg="Welcome to CakePHP 5"
42 | else
43 | supported_use_case="True"
44 | BRANCH_TO_TEST="master"
45 | check_msg="Welcome to your CakePHP application on OpenShift"
46 | fi
47 | if [ "${supported_use_case:-False}" == "True" ]; then
48 | ct_os_test_template_app "${IMAGE_NAME}" \
49 | "https://raw.githubusercontent.com/sclorg/cakephp-ex/${BRANCH_TO_TEST}/openshift/templates/cakephp.json" \
50 | php \
51 | "$check_msg" \
52 | 8080 http 200 "-p SOURCE_REPOSITORY_REF=${BRANCH_TO_TEST} -p SOURCE_REPOSITORY_URL=https://github.com/sclorg/cakephp-ex.git -p PHP_VERSION=${VERSION} -p NAME=php-testing"
53 | fi
54 | }
55 |
56 |
57 | function test_latest_imagestreams() {
58 | info "Testing the latest version in imagestreams"
59 | # Switch to root directory of a container
60 | pushd "${THISDIR}/../.." >/dev/null
61 | ct_check_latest_imagestreams
62 | popd >/dev/null
63 | }
64 | # vim: set tabstop=2:shiftwidth=2:expandtab:
65 |
--------------------------------------------------------------------------------
/8.3/root/usr/libexec/container-setup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # In order to drop the root user, we have to make some directories world
6 | # writeable as OpenShift default security model is to run the container under
7 | # random UID.
8 |
9 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
10 |
11 | # compatibility symlinks so we hide SCL paths
12 | if [ -v SCL_ENABLED ] ; then
13 | # /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
14 | mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
15 | ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd
16 |
17 | # /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
18 | mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
19 | ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd
20 |
21 | # /opt/rh/httpd24/root/var/www will be symlink to /var/www
22 | rm -rf /var/www
23 | mv ${HTTPD_DATA_ORIG_PATH} /var/www
24 | ln -s /var/www ${HTTPD_DATA_ORIG_PATH}
25 | else
26 | rm -f /opt/app-root/etc/scl_enable
27 | fi
28 |
29 | /usr/libexec/httpd-ssl-gencerts
30 |
31 | mkdir -p ${HTTPD_CONFIGURATION_PATH}
32 | chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
33 | chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}
34 | chmod -R ug+r /etc/pki/tls/certs/localhost.crt
35 | chown -R 1001:0 /etc/pki/tls/certs/localhost.crt
36 | chmod -R ug+r /etc/pki/tls/private/localhost.key
37 | chown -R 1001:0 /etc/pki/tls/private/localhost.key
38 | mkdir -p ${APP_ROOT}/etc
39 | chmod -R a+rwx ${APP_ROOT}/etc
40 | chmod -R a+rwx ${HTTPD_VAR_RUN}
41 | chown -R 1001:0 ${APP_ROOT}
42 | mkdir -p /tmp/sessions
43 | chmod -R a+rwx /tmp/sessions
44 | chown -R 1001:0 /tmp/sessions
45 | chown -R 1001:0 ${HTTPD_DATA_PATH}
46 |
47 | chmod a+rwx "${PHP_SYSCONF_PATH}/php.ini"
48 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php.d"
49 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php-fpm.d"
50 |
51 | if [ "x$PLATFORM" == "xel10" ] || [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
52 | if [ -v PHP_FPM_RUN_DIR ]; then
53 | mkdir -p ${PHP_FPM_RUN_DIR}
54 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
55 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
56 | mkdir -p ${PHP_FPM_LOG_PATH}
57 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
58 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
59 | fi
60 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
61 | echo "Setting clear_env to no in assemble script"
62 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
63 | fi
64 | fi
65 |
66 | mkdir -p ${PHP_CONTAINER_SCRIPTS_PATH}/pre-init
67 |
68 | config_general
69 |
--------------------------------------------------------------------------------
/.github/workflows/auto-merge-on-demand.yml:
--------------------------------------------------------------------------------
1 | name: Auto Merge On Demand
2 | on:
3 | issue_comment:
4 | types:
5 | - created
6 | workflow_dispatch:
7 | inputs:
8 | pr-number:
9 | description: 'Pull Request number/s ; when not provided, the workflow will run for all open PRs'
10 | required: true
11 | default: '0'
12 |
13 | permissions:
14 | contents: read
15 |
16 | jobs:
17 | # Get all open PRs
18 | gather-pull-requests:
19 | if: |
20 | github.repository_owner == 'sclorg'
21 | || (contains(github.event.comment.body, '/auto-merge')
22 | && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association))
23 | runs-on: ubuntu-latest
24 |
25 | outputs:
26 | pr-numbers: ${{ steps.get-pr-numbers.outputs.result }}
27 | pr-numbers-manual: ${{ steps.parse-manual-input.outputs.result }}
28 |
29 | steps:
30 | - id: get-pr-numbers
31 | if: inputs.pr-number == '0'
32 | name: Get all open PRs
33 | uses: actions/github-script@v8
34 | with:
35 | # !FIXME: this is not working if there is more than 100 PRs opened
36 | script: |
37 | const { data: pullRequests } = await github.rest.pulls.list({
38 | owner: context.repo.owner,
39 | repo: context.repo.repo,
40 | state: 'open',
41 | per_page: 100
42 | });
43 | return pullRequests.map(pr => pr.number);
44 |
45 | - id: parse-manual-input
46 | if: inputs.pr-number != '0'
47 | name: Parse manual input
48 | run: |
49 | # shellcheck disable=SC2086
50 | echo "result="[ ${{ github.event.issue.number }} ]"" >> $GITHUB_OUTPUT
51 | shell: bash
52 |
53 | validate-pr:
54 | name: 'Validation of Pull Request #${{ matrix.pr-number }}'
55 | needs: [ gather-pull-requests ]
56 | runs-on: ubuntu-latest
57 |
58 | strategy:
59 | fail-fast: false
60 | matrix:
61 | pr-number: ${{ inputs.pr-number == 0 && fromJSON(needs.gather-pull-requests.outputs.pr-numbers) || fromJSON(needs.gather-pull-requests.outputs.pr-numbers-manual) }}
62 |
63 | permissions:
64 | # required for merging PRs
65 | contents: write
66 | # required for PR comments and setting labels
67 | pull-requests: write
68 |
69 | steps:
70 | - name: Auto Merge wrapper
71 | uses: sclorg/auto-merge-wrapper@v1
72 | with:
73 | pr-number: ${{ matrix.pr-number }}
74 | token: ${{ secrets.GITHUB_TOKEN }}
75 |
--------------------------------------------------------------------------------
/test/test_container_ssl.py:
--------------------------------------------------------------------------------
1 | import tempfile
2 |
3 | from pathlib import Path
4 |
5 | from container_ci_suite.container_lib import ContainerTestLib
6 | from container_ci_suite.engines.container import ContainerImage
7 | from container_ci_suite.utils import ContainerTestLibUtils
8 |
9 | from conftest import VARS
10 |
11 | self_signed_ssl = VARS.TEST_DIR / "self-signed-ssl"
12 |
13 |
14 | def build_ssl_app(app_path: Path, container_args: str = "") -> ContainerTestLib:
15 | container_lib = ContainerTestLib(VARS.IMAGE_NAME)
16 | app_name = app_path.name
17 | s2i_app = container_lib.build_as_df(
18 | app_path=app_path,
19 | s2i_args=f"--pull-policy=never {container_args} {container_lib.build_s2i_npm_variables()}",
20 | src_image=VARS.IMAGE_NAME,
21 | dst_image=f"{VARS.IMAGE_NAME}-{app_name}"
22 | )
23 | return s2i_app
24 |
25 |
26 | class TestPHPSslTestAppContainer:
27 | def setup_method(self):
28 | self.s2i_app = build_ssl_app(self_signed_ssl)
29 |
30 | def teardown_method(self):
31 | self.s2i_app.cleanup()
32 |
33 | def test_run_app_test(self):
34 | """
35 | Test checks if SSL certificates are different then in server one.
36 | The SSL certificates should not be used in production.
37 | """
38 | cid_file_name = self.s2i_app.app_name
39 | assert self.s2i_app.create_container(cid_file_name=cid_file_name, container_args="--user=100001")
40 | assert ContainerImage.wait_for_cid(cid_file_name=cid_file_name)
41 | cid = self.s2i_app.get_cid(cid_file_name=cid_file_name)
42 | assert cid
43 | cip = self.s2i_app.get_cip(cid_file_name=cid_file_name)
44 | assert cip
45 | assert self.s2i_app.test_response(
46 | url=f"https://{cip}", port=8443
47 | )
48 | server_cmd = f"openssl s_client -showcerts -servername {cip} -connect {cip}:8443 2>/dev/null"
49 | server_output = ContainerTestLibUtils.run_command(cmd=server_cmd)
50 | certificate_dir = tempfile.mkdtemp(prefix="/tmp/server_cert_dir")
51 | (Path(certificate_dir) / "output").write_text(server_output)
52 | server_cert = ContainerTestLibUtils.run_command(
53 | cmd=f"openssl x509 -inform pem -noout -text -in {Path(certificate_dir)}/output"
54 | )
55 | config_cmd = (f"openssl x509 -in "
56 | f"{VARS.TEST_DIR}/{self.s2i_app.app_name}/httpd-ssl/certs/server-cert-selfsigned.pem"
57 | f" -inform pem -noout -text")
58 | config_cert = ContainerTestLibUtils.run_command(cmd=config_cmd)
59 | assert server_cert == config_cert
60 |
--------------------------------------------------------------------------------
/8.1/root/usr/libexec/container-setup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # In order to drop the root user, we have to make some directories world
6 | # writeable as OpenShift default security model is to run the container under
7 | # random UID.
8 |
9 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
10 |
11 | # compatibility symlinks so we hide SCL paths
12 | if [ -v SCL_ENABLED ] ; then
13 | # /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
14 | mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
15 | ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd
16 |
17 | # /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
18 | mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
19 | ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd
20 |
21 | # /opt/rh/httpd24/root/var/www will be symlink to /var/www
22 | rm -rf /var/www
23 | mv ${HTTPD_DATA_ORIG_PATH} /var/www
24 | ln -s /var/www ${HTTPD_DATA_ORIG_PATH}
25 | else
26 | rm -f /opt/app-root/etc/scl_enable
27 | fi
28 |
29 | if head "/etc/redhat-release" | grep -q -e "^Red Hat Enterprise Linux release 8" -e "^Red Hat Enterprise Linux release 9" -e "Fedora" -e "^CentOS Stream release 9"; then
30 | /usr/libexec/httpd-ssl-gencerts
31 | fi
32 |
33 | mkdir -p ${HTTPD_CONFIGURATION_PATH}
34 | chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
35 | chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}
36 | chmod -R ug+r /etc/pki/tls/certs/localhost.crt
37 | chmod -R ug+r /etc/pki/tls/private/localhost.key
38 | chown -R 1001:0 /etc/pki/tls/certs/localhost.crt
39 | chown -R 1001:0 /etc/pki/tls/private/localhost.key
40 | mkdir -p ${APP_ROOT}/etc
41 | chmod -R a+rwx ${APP_ROOT}/etc
42 | chmod -R a+rwx ${HTTPD_VAR_RUN}
43 | chown -R 1001:0 ${APP_ROOT}
44 | mkdir -p /tmp/sessions
45 | chmod -R a+rwx /tmp/sessions
46 | chown -R 1001:0 /tmp/sessions
47 | chown -R 1001:0 ${HTTPD_DATA_PATH}
48 | if [ "$PLATFORM" == "el7" ]; then
49 | # Only run for el7 as this essentially becomes "chmod -R /etc" outside of SCL-based images
50 | chmod -R a+rwx "${PHP_SYSCONF_PATH}"
51 | else
52 | chmod a+rwx "${PHP_SYSCONF_PATH}/php.ini"
53 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php.d"
54 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php-fpm.d"
55 | fi
56 |
57 | if [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
58 | if [ -v PHP_FPM_RUN_DIR ]; then
59 | mkdir -p ${PHP_FPM_RUN_DIR}
60 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
61 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
62 | mkdir -p ${PHP_FPM_LOG_PATH}
63 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
64 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
65 | fi
66 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
67 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
68 | fi
69 |
70 | fi
71 |
72 | mkdir -p ${PHP_CONTAINER_SCRIPTS_PATH}/pre-init
73 |
74 | config_general
75 |
--------------------------------------------------------------------------------
/8.0/root/usr/libexec/container-setup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # In order to drop the root user, we have to make some directories world
6 | # writeable as OpenShift default security model is to run the container under
7 | # random UID.
8 |
9 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
10 |
11 | # compatibility symlinks so we hide SCL paths
12 | if [ -v SCL_ENABLED ] ; then
13 | # /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
14 | mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
15 | ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd
16 |
17 | # /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
18 | mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
19 | ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd
20 |
21 | # /opt/rh/httpd24/root/var/www will be symlink to /var/www
22 | rm -rf /var/www
23 | mv ${HTTPD_DATA_ORIG_PATH} /var/www
24 | ln -s /var/www ${HTTPD_DATA_ORIG_PATH}
25 | else
26 | rm -f /opt/app-root/etc/scl_enable
27 | fi
28 |
29 | if head "/etc/redhat-release" | grep -q -e "^Red Hat Enterprise Linux release 8" -e "^Red Hat Enterprise Linux release 9" -e "Fedora" -e "^CentOS Stream release 9"; then
30 | /usr/libexec/httpd-ssl-gencerts
31 | fi
32 |
33 | mkdir -p ${HTTPD_CONFIGURATION_PATH}
34 | chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
35 | chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}
36 | chmod -R ug+r /etc/pki/tls/certs/localhost.crt
37 | chmod -R ug+r /etc/pki/tls/private/localhost.key
38 | chown -R 1001:0 /etc/pki/tls/certs/localhost.crt
39 | chown -R 1001:0 /etc/pki/tls/private/localhost.key
40 | mkdir -p ${APP_ROOT}/etc
41 | chmod -R a+rwx ${APP_ROOT}/etc
42 | chmod -R a+rwx ${HTTPD_VAR_RUN}
43 | chown -R 1001:0 ${APP_ROOT}
44 | mkdir -p /tmp/sessions
45 | chmod -R a+rwx /tmp/sessions
46 | chown -R 1001:0 /tmp/sessions
47 | chown -R 1001:0 ${HTTPD_DATA_PATH}
48 | if [ "$PLATFORM" == "el7" ]; then
49 | # Only run for el7 as this essentially becomes "chmod -R /etc" outside of SCL-based images
50 | chmod -R a+rwx "${PHP_SYSCONF_PATH}"
51 | else
52 | chmod a+rwx "${PHP_SYSCONF_PATH}/php.ini"
53 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php.d"
54 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php-fpm.d"
55 | fi
56 |
57 | if [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
58 | if [ -v PHP_FPM_RUN_DIR ]; then
59 | mkdir -p ${PHP_FPM_RUN_DIR}
60 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
61 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
62 | mkdir -p ${PHP_FPM_LOG_PATH}
63 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
64 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
65 | fi
66 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
67 | echo "Setting clear_env to no in assemble script"
68 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
69 | fi
70 | fi
71 |
72 | mkdir -p ${PHP_CONTAINER_SCRIPTS_PATH}/pre-init
73 |
74 | config_general
75 |
--------------------------------------------------------------------------------
/8.2/root/usr/libexec/container-setup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # In order to drop the root user, we have to make some directories world
6 | # writeable as OpenShift default security model is to run the container under
7 | # random UID.
8 |
9 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
10 |
11 | # compatibility symlinks so we hide SCL paths
12 | if [ -v SCL_ENABLED ] ; then
13 | # /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
14 | mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
15 | ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd
16 |
17 | # /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
18 | mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
19 | ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd
20 |
21 | # /opt/rh/httpd24/root/var/www will be symlink to /var/www
22 | rm -rf /var/www
23 | mv ${HTTPD_DATA_ORIG_PATH} /var/www
24 | ln -s /var/www ${HTTPD_DATA_ORIG_PATH}
25 | else
26 | rm -f /opt/app-root/etc/scl_enable
27 | fi
28 |
29 | if head "/etc/redhat-release" | grep -q -e "^Red Hat Enterprise Linux release 8" -e "^Red Hat Enterprise Linux release 9" -e "Fedora" -e "^CentOS Stream release 9"; then
30 | /usr/libexec/httpd-ssl-gencerts
31 | fi
32 |
33 | mkdir -p ${HTTPD_CONFIGURATION_PATH}
34 | chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
35 | chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}
36 | chmod -R ug+r /etc/pki/tls/certs/localhost.crt
37 | chmod -R ug+r /etc/pki/tls/private/localhost.key
38 | chown -R 1001:0 /etc/pki/tls/certs/localhost.crt
39 | chown -R 1001:0 /etc/pki/tls/private/localhost.key
40 | mkdir -p ${APP_ROOT}/etc
41 | chmod -R a+rwx ${APP_ROOT}/etc
42 | chmod -R a+rwx ${HTTPD_VAR_RUN}
43 | chown -R 1001:0 ${APP_ROOT}
44 | mkdir -p /tmp/sessions
45 | chmod -R a+rwx /tmp/sessions
46 | chown -R 1001:0 /tmp/sessions
47 | chown -R 1001:0 ${HTTPD_DATA_PATH}
48 | if [ "$PLATFORM" == "el7" ]; then
49 | # Only run for el7 as this essentially becomes "chmod -R /etc" outside of SCL-based images
50 | chmod -R a+rwx "${PHP_SYSCONF_PATH}"
51 | else
52 | chmod a+rwx "${PHP_SYSCONF_PATH}/php.ini"
53 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php.d"
54 | chmod -R a+rwx "${PHP_SYSCONF_PATH}/php-fpm.d"
55 | fi
56 |
57 | if [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
58 | if [ -v PHP_FPM_RUN_DIR ]; then
59 | mkdir -p ${PHP_FPM_RUN_DIR}
60 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
61 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
62 | mkdir -p ${PHP_FPM_LOG_PATH}
63 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
64 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
65 | fi
66 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
67 | echo "Setting clear_env to no in assemble script"
68 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
69 | fi
70 | fi
71 |
72 | mkdir -p ${PHP_CONTAINER_SCRIPTS_PATH}/pre-init
73 |
74 | config_general
75 |
--------------------------------------------------------------------------------
/7.4/s2i/bin/run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
4 |
5 | export_vars=$(cgroup-limits); export $export_vars
6 | export DOCUMENTROOT=${DOCUMENTROOT:-/}
7 |
8 | # Default php.ini configuration values, all taken
9 | # from php defaults.
10 | export ERROR_REPORTING=${ERROR_REPORTING:-E_ALL & ~E_NOTICE}
11 | export DISPLAY_ERRORS=${DISPLAY_ERRORS:-ON}
12 | export DISPLAY_STARTUP_ERRORS=${DISPLAY_STARTUP_ERRORS:-OFF}
13 | export TRACK_ERRORS=${TRACK_ERRORS:-OFF}
14 | export HTML_ERRORS=${HTML_ERRORS:-ON}
15 | export INCLUDE_PATH=${INCLUDE_PATH:-.:/opt/app-root/src:${PHP_DEFAULT_INCLUDE_PATH}}
16 | export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-128M}
17 | export SESSION_NAME=${SESSION_NAME:-PHPSESSID}
18 | export SESSION_HANDLER=${SESSION_HANDLER:-files}
19 | export SESSION_PATH=${SESSION_PATH:-/tmp/sessions}
20 | export SESSION_COOKIE_DOMAIN=${SESSION_COOKIE_DOMAIN:-}
21 | export SESSION_COOKIE_HTTPONLY=${SESSION_COOKIE_HTTPONLY:-}
22 | export SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE:-0}
23 | export SHORT_OPEN_TAG=${SHORT_OPEN_TAG:-OFF}
24 |
25 | # TODO should be dynamically calculated based on container memory limit/16
26 | export OPCACHE_MEMORY_CONSUMPTION=${OPCACHE_MEMORY_CONSUMPTION:-128}
27 |
28 | export OPCACHE_REVALIDATE_FREQ=${OPCACHE_REVALIDATE_FREQ:-2}
29 | export OPCACHE_MAX_FILES=${OPCACHE_MAX_FILES:-4000}
30 |
31 | export PHPRC=${PHPRC:-${PHP_SYSCONF_PATH}/php.ini}
32 | export PHP_INI_SCAN_DIR=${PHP_INI_SCAN_DIR:-${PHP_SYSCONF_PATH}/php.d}
33 |
34 | envsubst < /opt/app-root/etc/php.ini.template > ${PHP_SYSCONF_PATH}/php.ini
35 | envsubst < /opt/app-root/etc/php.d/10-opcache.ini.template > ${PHP_SYSCONF_PATH}/php.d/10-opcache.ini
36 |
37 | export HTTPD_START_SERVERS=${HTTPD_START_SERVERS:-8}
38 | export HTTPD_MAX_SPARE_SERVERS=$((HTTPD_START_SERVERS+10))
39 | export HTTPD_MAX_REQUESTS_PER_CHILD=${HTTPD_MAX_REQUESTS_PER_CHILD:-4000}
40 | export HTTPD_MAX_KEEPALIVE_REQUESTS=${HTTPD_MAX_KEEPALIVE_REQUESTS:-100}
41 |
42 | if [ -n "${NO_MEMORY_LIMIT:-}" -o -z "${MEMORY_LIMIT_IN_BYTES:-}" ]; then
43 | #
44 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-256}
45 | else
46 | # A simple calculation for MaxRequestWorkers would be: Total Memory / Size Per Apache process.
47 | # The total memory is determined from the Cgroups and the average size for the
48 | # Apache process is estimated to 15MB.
49 | max_clients_computed=$((MEMORY_LIMIT_IN_BYTES/1024/1024/15))
50 | # The MaxClients should never be lower than StartServers, which is set to 5.
51 | # In case the container has memory limit set to <64M we pin the MaxClients to 4.
52 | [[ $max_clients_computed -le 4 ]] && max_clients_computed=4
53 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-$max_clients_computed}
54 | echo "-> Cgroups memory limit is set, using HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS}"
55 | fi
56 |
57 | # pre-start files
58 | process_extending_files ${APP_DATA}/php-pre-start/ ${PHP_CONTAINER_SCRIPTS_PATH}/pre-start/
59 |
60 | exec httpd -D FOREGROUND
61 |
--------------------------------------------------------------------------------
/7.4/Dockerfile.fedora:
--------------------------------------------------------------------------------
1 | FROM registry.fedoraproject.org/f32/s2i-base:latest
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | ENV PHP_VERSION=7.4 \
10 | PATH=$PATH:/usr/bin
11 |
12 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
13 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
14 | building and running various PHP $PHP_VERSION applications and frameworks. \
15 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
16 | to write dynamically generated web pages. PHP also offers built-in database integration \
17 | for several commercial and non-commercial database management systems, so writing \
18 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
19 | is probably as a replacement for CGI scripts."
20 |
21 | ENV NAME=php \
22 | VERSION=0 \
23 | RELEASE=1 \
24 | ARCH=x86_64
25 |
26 | LABEL summary="$SUMMARY" \
27 | description="$DESCRIPTION" \
28 | io.k8s.description="$DESCRIPTION" \
29 | io.k8s.display-name="Apache 2.4 with PHP $PHP_VERSION" \
30 | io.openshift.expose-services="8080:http" \
31 | io.openshift.tags="builder,php" \
32 | name="$FGC/$NAME" \
33 | com.redhat.component="$NAME" \
34 | version="$VERSION" \
35 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=/$PHP_VERSION/test/test-app $FGC/$NAME sample-server" \
36 | maintainer="SoftwareCollections.org "
37 |
38 | # Install Apache httpd and PHP
39 | ARG INSTALL_PKGS="php php-mysqlnd php-bcmath php-json \
40 | php-gd php-intl php-ldap php-mbstring php-pdo \
41 | php-process php-soap php-opcache php-xml \
42 | php-gmp php-pecl-apcu mod_ssl hostname"
43 |
44 | RUN yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS --nogpgcheck && \
45 | rpm -V $INSTALL_PKGS && \
46 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
47 | yum -y clean all --enablerepo='*'
48 |
49 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
50 | APP_DATA=${APP_ROOT}/src \
51 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
52 | PHP_SYSCONF_PATH=/etc/ \
53 | PHP_HTTPD_CONF_FILE=php.conf \
54 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
55 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
56 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
57 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
58 | HTTPD_VAR_RUN=/var/run/httpd \
59 | HTTPD_DATA_PATH=/var/www \
60 | HTTPD_DATA_ORIG_PATH=/var/www \
61 | HTTPD_VAR_PATH=/var
62 |
63 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
64 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
65 |
66 | # Copy extra files to the image.
67 | COPY ./root/ /
68 |
69 | # Reset permissions of filesystem to default values
70 | RUN /usr/libexec/container-setup && rpm-file-permissions
71 |
72 | USER 1001
73 |
74 | # Set the default CMD to print the usage of the language image
75 | CMD $STI_SCRIPTS_PATH/usage
76 |
--------------------------------------------------------------------------------
/8.0/Dockerfile.fedora:
--------------------------------------------------------------------------------
1 | FROM quay.io/fedora/s2i-base:35
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | ENV PHP_VERSION=8.0 \
10 | PHP_SHORT_VER=80 \
11 | PATH=$PATH:/usr/bin
12 |
13 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
14 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
15 | building and running various PHP $PHP_VERSION applications and frameworks. \
16 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
17 | to write dynamically generated web pages. PHP also offers built-in database integration \
18 | for several commercial and non-commercial database management systems, so writing \
19 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
20 | is probably as a replacement for CGI scripts."
21 |
22 | ENV NAME=php \
23 | VERSION=0 \
24 | RELEASE=1 \
25 | ARCH=x86_64
26 |
27 | LABEL summary="$SUMMARY" \
28 | description="$DESCRIPTION" \
29 | io.k8s.description="$DESCRIPTION" \
30 | io.k8s.display-name="Apache 2.4 with PHP $PHP_VERSION" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,php" \
33 | name="fedora/$NAME-$PHP_SHORT_VER" \
34 | com.redhat.component="$NAME" \
35 | version="$VERSION" \
36 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=/$PHP_VERSION/test/test-app quay.io/fedora/$NAME-$PHP_SHORT_VER sample-server" \
37 | maintainer="SoftwareCollections.org "
38 |
39 | # Install Apache httpd and PHP
40 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-bcmath \
41 | php-gd php-intl php-ldap php-mbstring php-pdo \
42 | php-process php-soap php-opcache php-xml \
43 | php-gmp php-pecl-apcu mod_ssl hostname"
44 |
45 | RUN yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS --nogpgcheck && \
46 | rpm -V $INSTALL_PKGS && \
47 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
48 | yum -y clean all --enablerepo='*'
49 |
50 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
51 | APP_DATA=${APP_ROOT}/src \
52 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
53 | PHP_SYSCONF_PATH=/etc \
54 | PHP_HTTPD_CONF_FILE=php.conf \
55 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
56 | PHP_FPM_CONF_FILE=www.conf \
57 | PHP_FPM_RUN_DIR=/run/php-fpm \
58 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
59 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
60 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
61 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
62 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
63 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
64 | HTTPD_VAR_RUN=/var/run/httpd \
65 | HTTPD_DATA_PATH=/var/www \
66 | HTTPD_DATA_ORIG_PATH=/var/www \
67 | HTTPD_VAR_PATH=/var
68 |
69 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
70 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
71 |
72 | # Copy extra files to the image.
73 | COPY ./root/ /
74 |
75 | # Reset permissions of filesystem to default values
76 | RUN /usr/libexec/container-setup && rpm-file-permissions
77 |
78 | USER 1001
79 |
80 | # Set the default CMD to print the usage of the language image
81 | CMD $STI_SCRIPTS_PATH/usage
82 |
--------------------------------------------------------------------------------
/8.1/Dockerfile.fedora:
--------------------------------------------------------------------------------
1 | FROM quay.io/fedora/s2i-base:37
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | ENV PHP_VERSION=8.1 \
10 | PHP_SHORT_VER=81 \
11 | PATH=$PATH:/usr/bin
12 |
13 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
14 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
15 | building and running various PHP $PHP_VERSION applications and frameworks. \
16 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
17 | to write dynamically generated web pages. PHP also offers built-in database integration \
18 | for several commercial and non-commercial database management systems, so writing \
19 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
20 | is probably as a replacement for CGI scripts."
21 |
22 | ENV NAME=php \
23 | VERSION=0 \
24 | RELEASE=1 \
25 | ARCH=x86_64
26 |
27 | LABEL summary="$SUMMARY" \
28 | description="$DESCRIPTION" \
29 | io.k8s.description="$DESCRIPTION" \
30 | io.k8s.display-name="Apache 2.4 with PHP $PHP_VERSION" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,php" \
33 | name="fedora/$NAME-$PHP_SHORT_VER" \
34 | com.redhat.component="$NAME" \
35 | version="$VERSION" \
36 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=/$PHP_VERSION/test/test-app quay.io/fedora/$NAME-$PHP_SHORT_VER sample-server" \
37 | maintainer="SoftwareCollections.org "
38 |
39 | # Install Apache httpd and PHP
40 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-bcmath \
41 | php-gd php-intl php-ldap php-mbstring php-pdo \
42 | php-process php-soap php-opcache php-xml \
43 | php-gmp php-pecl-apcu mod_ssl hostname"
44 |
45 | RUN yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS --nogpgcheck && \
46 | rpm -V $INSTALL_PKGS && \
47 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
48 | yum -y clean all --enablerepo='*'
49 |
50 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
51 | APP_DATA=${APP_ROOT}/src \
52 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
53 | PHP_SYSCONF_PATH=/etc \
54 | PHP_HTTPD_CONF_FILE=php.conf \
55 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
56 | PHP_FPM_CONF_FILE=www.conf \
57 | PHP_FPM_RUN_DIR=/run/php-fpm \
58 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
59 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
60 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
61 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
62 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
63 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
64 | HTTPD_VAR_RUN=/var/run/httpd \
65 | HTTPD_DATA_PATH=/var/www \
66 | HTTPD_DATA_ORIG_PATH=/var/www \
67 | HTTPD_VAR_PATH=/var
68 |
69 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
70 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
71 |
72 | # Copy extra files to the image.
73 | COPY ./root/ /
74 |
75 | # Reset permissions of filesystem to default values
76 | RUN /usr/libexec/container-setup && rpm-file-permissions
77 |
78 | USER 1001
79 |
80 | # Set the default CMD to print the usage of the language image
81 | CMD $STI_SCRIPTS_PATH/usage
82 |
--------------------------------------------------------------------------------
/8.2/Dockerfile.fedora:
--------------------------------------------------------------------------------
1 | FROM quay.io/fedora/s2i-base:38
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | ENV PHP_VERSION=8.2 \
10 | PHP_SHORT_VER=82 \
11 | PATH=$PATH:/usr/bin
12 |
13 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
14 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
15 | building and running various PHP $PHP_VERSION applications and frameworks. \
16 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
17 | to write dynamically generated web pages. PHP also offers built-in database integration \
18 | for several commercial and non-commercial database management systems, so writing \
19 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
20 | is probably as a replacement for CGI scripts."
21 |
22 | ENV NAME=php \
23 | VERSION=0 \
24 | RELEASE=1 \
25 | ARCH=x86_64
26 |
27 | LABEL summary="$SUMMARY" \
28 | description="$DESCRIPTION" \
29 | io.k8s.description="$DESCRIPTION" \
30 | io.k8s.display-name="Apache 2.4 with PHP $PHP_VERSION" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,php" \
33 | name="fedora/$NAME-$PHP_SHORT_VER" \
34 | com.redhat.component="$NAME" \
35 | version="$VERSION" \
36 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=/$PHP_VERSION/test/test-app quay.io/fedora/$NAME-$PHP_SHORT_VER sample-server" \
37 | maintainer="SoftwareCollections.org "
38 |
39 | # Install Apache httpd and PHP
40 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-bcmath \
41 | php-gd php-intl php-ldap php-mbstring php-pdo \
42 | php-process php-soap php-opcache php-xml \
43 | php-gmp php-pecl-apcu mod_ssl hostname"
44 |
45 | RUN yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS --nogpgcheck && \
46 | rpm -V $INSTALL_PKGS && \
47 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
48 | yum -y clean all --enablerepo='*'
49 |
50 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
51 | APP_DATA=${APP_ROOT}/src \
52 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
53 | PHP_SYSCONF_PATH=/etc \
54 | PHP_HTTPD_CONF_FILE=php.conf \
55 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
56 | PHP_FPM_CONF_FILE=www.conf \
57 | PHP_FPM_RUN_DIR=/run/php-fpm \
58 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
59 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
60 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
61 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
62 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
63 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
64 | HTTPD_VAR_RUN=/var/run/httpd \
65 | HTTPD_DATA_PATH=/var/www \
66 | HTTPD_DATA_ORIG_PATH=/var/www \
67 | HTTPD_VAR_PATH=/var
68 |
69 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
70 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
71 |
72 | # Copy extra files to the image.
73 | COPY ./root/ /
74 |
75 | # Reset permissions of filesystem to default values
76 | RUN /usr/libexec/container-setup && rpm-file-permissions
77 |
78 | USER 1001
79 |
80 | # Set the default CMD to print the usage of the language image
81 | CMD $STI_SCRIPTS_PATH/usage
82 |
--------------------------------------------------------------------------------
/8.0/s2i/bin/run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
4 |
5 | export_vars=$(cgroup-limits); export $export_vars
6 | export DOCUMENTROOT=${DOCUMENTROOT:-/}
7 |
8 | # Default php.ini configuration values, all taken
9 | # from php defaults.
10 | export ERROR_REPORTING=${ERROR_REPORTING:-E_ALL & ~E_NOTICE}
11 | export DISPLAY_ERRORS=${DISPLAY_ERRORS:-ON}
12 | export DISPLAY_STARTUP_ERRORS=${DISPLAY_STARTUP_ERRORS:-OFF}
13 | export HTML_ERRORS=${HTML_ERRORS:-ON}
14 | export INCLUDE_PATH=${INCLUDE_PATH:-.:/opt/app-root/src:${PHP_DEFAULT_INCLUDE_PATH}}
15 | export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-128M}
16 | export SESSION_NAME=${SESSION_NAME:-PHPSESSID}
17 | export SESSION_HANDLER=${SESSION_HANDLER:-files}
18 | export SESSION_PATH=${SESSION_PATH:-/tmp/sessions}
19 | export SESSION_COOKIE_DOMAIN=${SESSION_COOKIE_DOMAIN:-}
20 | export SESSION_COOKIE_HTTPONLY=${SESSION_COOKIE_HTTPONLY:-}
21 | export SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE:-0}
22 | export SHORT_OPEN_TAG=${SHORT_OPEN_TAG:-OFF}
23 |
24 | # TODO should be dynamically calculated based on container memory limit/16
25 | export OPCACHE_MEMORY_CONSUMPTION=${OPCACHE_MEMORY_CONSUMPTION:-128}
26 |
27 | export OPCACHE_REVALIDATE_FREQ=${OPCACHE_REVALIDATE_FREQ:-2}
28 | export OPCACHE_MAX_FILES=${OPCACHE_MAX_FILES:-4000}
29 |
30 | export PHPRC=${PHPRC:-${PHP_SYSCONF_PATH}/php.ini}
31 | export PHP_INI_SCAN_DIR=${PHP_INI_SCAN_DIR:-${PHP_SYSCONF_PATH}/php.d}
32 |
33 | envsubst < /opt/app-root/etc/php.ini.template > ${PHP_SYSCONF_PATH}/php.ini
34 | envsubst < /opt/app-root/etc/php.d/10-opcache.ini.template > ${PHP_SYSCONF_PATH}/php.d/10-opcache.ini
35 |
36 | export HTTPD_START_SERVERS=${HTTPD_START_SERVERS:-8}
37 | export HTTPD_MAX_SPARE_SERVERS=$((HTTPD_START_SERVERS+10))
38 | export HTTPD_MAX_REQUESTS_PER_CHILD=${HTTPD_MAX_REQUESTS_PER_CHILD:-4000}
39 | export HTTPD_MAX_KEEPALIVE_REQUESTS=${HTTPD_MAX_KEEPALIVE_REQUESTS:-100}
40 |
41 | if [ -n "${NO_MEMORY_LIMIT:-}" -o -z "${MEMORY_LIMIT_IN_BYTES:-}" ]; then
42 | #
43 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-256}
44 | else
45 | # A simple calculation for MaxRequestWorkers would be: Total Memory / Size Per Apache process.
46 | # The total memory is determined from the Cgroups and the average size for the
47 | # Apache process is estimated to 15MB.
48 | max_clients_computed=$((MEMORY_LIMIT_IN_BYTES/1024/1024/15))
49 | # The MaxClients should never be lower than StartServers, which is set to 5.
50 | # In case the container has memory limit set to <64M we pin the MaxClients to 4.
51 | [[ $max_clients_computed -le 4 ]] && max_clients_computed=4
52 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-$max_clients_computed}
53 | echo "-> Cgroups memory limit is set, using HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS}"
54 | fi
55 |
56 |
57 |
58 | if [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
59 | if [ -n "${PHP_FPM_RUN_DIR:-}" ]; then
60 | /bin/ln -s /dev/stderr ${PHP_FPM_LOG_PATH}/error.log
61 | mkdir -p ${PHP_FPM_RUN_DIR}
62 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
63 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
64 | mkdir -p ${PHP_FPM_LOG_PATH}
65 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
66 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
67 | fi
68 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
69 | echo "Setting clear_env to no in run script."
70 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
71 | fi
72 |
73 | fi
74 |
75 | # pre-start files
76 | process_extending_files ${APP_DATA}/php-pre-start/ ${PHP_CONTAINER_SCRIPTS_PATH}/pre-start/
77 |
78 | exec httpd -D FOREGROUND
79 |
--------------------------------------------------------------------------------
/8.1/s2i/bin/run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
4 |
5 | export_vars=$(cgroup-limits); export $export_vars
6 | export DOCUMENTROOT=${DOCUMENTROOT:-/}
7 |
8 | # Default php.ini configuration values, all taken
9 | # from php defaults.
10 | export ERROR_REPORTING=${ERROR_REPORTING:-E_ALL & ~E_NOTICE}
11 | export DISPLAY_ERRORS=${DISPLAY_ERRORS:-ON}
12 | export DISPLAY_STARTUP_ERRORS=${DISPLAY_STARTUP_ERRORS:-OFF}
13 | export HTML_ERRORS=${HTML_ERRORS:-ON}
14 | export INCLUDE_PATH=${INCLUDE_PATH:-.:/opt/app-root/src:${PHP_DEFAULT_INCLUDE_PATH}}
15 | export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-128M}
16 | export SESSION_NAME=${SESSION_NAME:-PHPSESSID}
17 | export SESSION_HANDLER=${SESSION_HANDLER:-files}
18 | export SESSION_PATH=${SESSION_PATH:-/tmp/sessions}
19 | export SESSION_COOKIE_DOMAIN=${SESSION_COOKIE_DOMAIN:-}
20 | export SESSION_COOKIE_HTTPONLY=${SESSION_COOKIE_HTTPONLY:-}
21 | export SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE:-0}
22 | export SHORT_OPEN_TAG=${SHORT_OPEN_TAG:-OFF}
23 |
24 | # TODO should be dynamically calculated based on container memory limit/16
25 | export OPCACHE_MEMORY_CONSUMPTION=${OPCACHE_MEMORY_CONSUMPTION:-128}
26 |
27 | export OPCACHE_REVALIDATE_FREQ=${OPCACHE_REVALIDATE_FREQ:-2}
28 | export OPCACHE_MAX_FILES=${OPCACHE_MAX_FILES:-4000}
29 |
30 | export PHPRC=${PHPRC:-${PHP_SYSCONF_PATH}/php.ini}
31 | export PHP_INI_SCAN_DIR=${PHP_INI_SCAN_DIR:-${PHP_SYSCONF_PATH}/php.d}
32 |
33 | envsubst < /opt/app-root/etc/php.ini.template > ${PHP_SYSCONF_PATH}/php.ini
34 | envsubst < /opt/app-root/etc/php.d/10-opcache.ini.template > ${PHP_SYSCONF_PATH}/php.d/10-opcache.ini
35 |
36 | export HTTPD_START_SERVERS=${HTTPD_START_SERVERS:-8}
37 | export HTTPD_MAX_SPARE_SERVERS=$((HTTPD_START_SERVERS+10))
38 | export HTTPD_MAX_REQUESTS_PER_CHILD=${HTTPD_MAX_REQUESTS_PER_CHILD:-4000}
39 | export HTTPD_MAX_KEEPALIVE_REQUESTS=${HTTPD_MAX_KEEPALIVE_REQUESTS:-100}
40 |
41 | if [ -n "${NO_MEMORY_LIMIT:-}" -o -z "${MEMORY_LIMIT_IN_BYTES:-}" ]; then
42 | #
43 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-256}
44 | else
45 | # A simple calculation for MaxRequestWorkers would be: Total Memory / Size Per Apache process.
46 | # The total memory is determined from the Cgroups and the average size for the
47 | # Apache process is estimated to 15MB.
48 | max_clients_computed=$((MEMORY_LIMIT_IN_BYTES/1024/1024/15))
49 | # The MaxClients should never be lower than StartServers, which is set to 5.
50 | # In case the container has memory limit set to <64M we pin the MaxClients to 4.
51 | [[ $max_clients_computed -le 4 ]] && max_clients_computed=4
52 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-$max_clients_computed}
53 | echo "-> Cgroups memory limit is set, using HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS}"
54 | fi
55 |
56 |
57 |
58 | if [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
59 | if [ -n "${PHP_FPM_RUN_DIR:-}" ]; then
60 | /bin/ln -s /dev/stderr ${PHP_FPM_LOG_PATH}/error.log
61 | mkdir -p ${PHP_FPM_RUN_DIR}
62 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
63 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
64 | mkdir -p ${PHP_FPM_LOG_PATH}
65 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
66 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
67 | fi
68 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
69 | echo "Setting clear_env to no in assemble script"
70 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
71 | fi
72 | fi
73 |
74 | # pre-start files
75 | process_extending_files ${APP_DATA}/php-pre-start/ ${PHP_CONTAINER_SCRIPTS_PATH}/pre-start/
76 |
77 | exec httpd -D FOREGROUND
78 |
--------------------------------------------------------------------------------
/8.2/s2i/bin/run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
4 |
5 | export_vars=$(cgroup-limits); export $export_vars
6 | export DOCUMENTROOT=${DOCUMENTROOT:-/}
7 |
8 | # Default php.ini configuration values, all taken
9 | # from php defaults.
10 | export ERROR_REPORTING=${ERROR_REPORTING:-E_ALL & ~E_NOTICE}
11 | export DISPLAY_ERRORS=${DISPLAY_ERRORS:-ON}
12 | export DISPLAY_STARTUP_ERRORS=${DISPLAY_STARTUP_ERRORS:-OFF}
13 | export HTML_ERRORS=${HTML_ERRORS:-ON}
14 | export INCLUDE_PATH=${INCLUDE_PATH:-.:/opt/app-root/src:${PHP_DEFAULT_INCLUDE_PATH}}
15 | export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-128M}
16 | export SESSION_NAME=${SESSION_NAME:-PHPSESSID}
17 | export SESSION_HANDLER=${SESSION_HANDLER:-files}
18 | export SESSION_PATH=${SESSION_PATH:-/tmp/sessions}
19 | export SESSION_COOKIE_DOMAIN=${SESSION_COOKIE_DOMAIN:-}
20 | export SESSION_COOKIE_HTTPONLY=${SESSION_COOKIE_HTTPONLY:-}
21 | export SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE:-0}
22 | export SHORT_OPEN_TAG=${SHORT_OPEN_TAG:-OFF}
23 |
24 | # TODO should be dynamically calculated based on container memory limit/16
25 | export OPCACHE_MEMORY_CONSUMPTION=${OPCACHE_MEMORY_CONSUMPTION:-128}
26 |
27 | export OPCACHE_REVALIDATE_FREQ=${OPCACHE_REVALIDATE_FREQ:-2}
28 | export OPCACHE_MAX_FILES=${OPCACHE_MAX_FILES:-4000}
29 |
30 | export PHPRC=${PHPRC:-${PHP_SYSCONF_PATH}/php.ini}
31 | export PHP_INI_SCAN_DIR=${PHP_INI_SCAN_DIR:-${PHP_SYSCONF_PATH}/php.d}
32 |
33 | envsubst < /opt/app-root/etc/php.ini.template > ${PHP_SYSCONF_PATH}/php.ini
34 | envsubst < /opt/app-root/etc/php.d/10-opcache.ini.template > ${PHP_SYSCONF_PATH}/php.d/10-opcache.ini
35 |
36 | export HTTPD_START_SERVERS=${HTTPD_START_SERVERS:-8}
37 | export HTTPD_MAX_SPARE_SERVERS=$((HTTPD_START_SERVERS+10))
38 | export HTTPD_MAX_REQUESTS_PER_CHILD=${HTTPD_MAX_REQUESTS_PER_CHILD:-4000}
39 | export HTTPD_MAX_KEEPALIVE_REQUESTS=${HTTPD_MAX_KEEPALIVE_REQUESTS:-100}
40 |
41 | if [ -n "${NO_MEMORY_LIMIT:-}" -o -z "${MEMORY_LIMIT_IN_BYTES:-}" ]; then
42 | #
43 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-256}
44 | else
45 | # A simple calculation for MaxRequestWorkers would be: Total Memory / Size Per Apache process.
46 | # The total memory is determined from the Cgroups and the average size for the
47 | # Apache process is estimated to 15MB.
48 | max_clients_computed=$((MEMORY_LIMIT_IN_BYTES/1024/1024/15))
49 | # The MaxClients should never be lower than StartServers, which is set to 5.
50 | # In case the container has memory limit set to <64M we pin the MaxClients to 4.
51 | [[ $max_clients_computed -le 4 ]] && max_clients_computed=4
52 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-$max_clients_computed}
53 | echo "-> Cgroups memory limit is set, using HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS}"
54 | fi
55 |
56 |
57 |
58 | if [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
59 | if [ -n "${PHP_FPM_RUN_DIR:-}" ]; then
60 | /bin/ln -s /dev/stderr ${PHP_FPM_LOG_PATH}/error.log
61 | mkdir -p ${PHP_FPM_RUN_DIR}
62 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
63 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
64 | mkdir -p ${PHP_FPM_LOG_PATH}
65 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
66 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
67 | fi
68 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
69 | echo "Setting clear_env to no in assemble script"
70 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
71 | fi
72 | fi
73 |
74 | # pre-start files
75 | process_extending_files ${APP_DATA}/php-pre-start/ ${PHP_CONTAINER_SCRIPTS_PATH}/pre-start/
76 |
77 | exec httpd -D FOREGROUND
78 |
--------------------------------------------------------------------------------
/8.3/Dockerfile.fedora:
--------------------------------------------------------------------------------
1 | FROM quay.io/fedora/s2i-base:40
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | ENV PHP_VERSION=8.3 \
10 | PHP_SHORT_VER=83 \
11 | PATH=$PATH:/usr/bin
12 |
13 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
14 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
15 | building and running various PHP $PHP_VERSION applications and frameworks. \
16 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
17 | to write dynamically generated web pages. PHP also offers built-in database integration \
18 | for several commercial and non-commercial database management systems, so writing \
19 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
20 | is probably as a replacement for CGI scripts."
21 |
22 | ENV NAME=php \
23 | VERSION=0 \
24 | RELEASE=1 \
25 | ARCH=x86_64
26 |
27 | LABEL summary="$SUMMARY" \
28 | description="$DESCRIPTION" \
29 | io.k8s.description="$DESCRIPTION" \
30 | io.k8s.display-name="Apache 2.4 with PHP $PHP_VERSION" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,php" \
33 | name="fedora/$NAME-$PHP_SHORT_VER" \
34 | com.redhat.component="$NAME" \
35 | version="$VERSION" \
36 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=/$PHP_VERSION/test/test-app quay.io/fedora/$NAME-$PHP_SHORT_VER sample-server" \
37 | maintainer="SoftwareCollections.org "
38 |
39 | # Install Apache httpd and PHP
40 | ARG INSTALL_PKGS="php php-fpm mod_ssl hostname"
41 | ARG INSTALL_EXTS="php-json php-mysqli php-pgsql php-bcmath \
42 | php-gd php-intl php-ldap php-mbstring php-pdo \
43 | php-process php-soap php-opcache php-xml \
44 | php-gmp php-apcu php-zip php-redis"
45 |
46 | RUN dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS --nogpgcheck && \
47 | rpm -V $INSTALL_PKGS && \
48 | php -v | grep -qe "v$PHP_VERSION\." && \
49 | echo "Found VERSION $PHP_VERSION" && \
50 | for ext in $(echo $INSTALL_EXTS | sed s/php-//g) ; do php -m | grep -qi "$ext\$"; done && \
51 | echo "Found requested extensions" && \
52 | dnf -y clean all --enablerepo='*'
53 |
54 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
55 | APP_DATA=${APP_ROOT}/src \
56 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
57 | PHP_SYSCONF_PATH=/etc \
58 | PHP_HTTPD_CONF_FILE=php.conf \
59 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
60 | PHP_FPM_CONF_FILE=www.conf \
61 | PHP_FPM_RUN_DIR=/run/php-fpm \
62 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
63 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
64 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
65 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
66 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
67 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
68 | HTTPD_VAR_RUN=/var/run/httpd \
69 | HTTPD_DATA_PATH=/var/www \
70 | HTTPD_DATA_ORIG_PATH=/var/www \
71 | HTTPD_VAR_PATH=/var
72 |
73 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
74 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
75 |
76 | # Copy extra files to the image.
77 | COPY ./root/ /
78 |
79 | # Reset permissions of filesystem to default values
80 | RUN /usr/libexec/container-setup && rpm-file-permissions
81 |
82 | USER 1001
83 |
84 | # Set the default CMD to print the usage of the language image
85 | CMD $STI_SCRIPTS_PATH/usage
86 |
--------------------------------------------------------------------------------
/8.3/s2i/bin/run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${PHP_CONTAINER_SCRIPTS_PATH}/common.sh
4 |
5 | export_vars=$(cgroup-limits); export $export_vars
6 | export DOCUMENTROOT=${DOCUMENTROOT:-/}
7 |
8 | # Default php.ini configuration values, all taken
9 | # from php defaults.
10 | export ERROR_REPORTING=${ERROR_REPORTING:-E_ALL & ~E_NOTICE}
11 | export DISPLAY_ERRORS=${DISPLAY_ERRORS:-ON}
12 | export DISPLAY_STARTUP_ERRORS=${DISPLAY_STARTUP_ERRORS:-OFF}
13 | export TRACK_ERRORS=${TRACK_ERRORS:-OFF}
14 | export HTML_ERRORS=${HTML_ERRORS:-ON}
15 | export INCLUDE_PATH=${INCLUDE_PATH:-.:/opt/app-root/src:${PHP_DEFAULT_INCLUDE_PATH}}
16 | export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-128M}
17 | export SESSION_NAME=${SESSION_NAME:-PHPSESSID}
18 | export SESSION_HANDLER=${SESSION_HANDLER:-files}
19 | export SESSION_PATH=${SESSION_PATH:-/tmp/sessions}
20 | export SESSION_COOKIE_DOMAIN=${SESSION_COOKIE_DOMAIN:-}
21 | export SESSION_COOKIE_HTTPONLY=${SESSION_COOKIE_HTTPONLY:-}
22 | export SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE:-0}
23 | export SHORT_OPEN_TAG=${SHORT_OPEN_TAG:-OFF}
24 |
25 | # TODO should be dynamically calculated based on container memory limit/16
26 | export OPCACHE_MEMORY_CONSUMPTION=${OPCACHE_MEMORY_CONSUMPTION:-128}
27 |
28 | export OPCACHE_REVALIDATE_FREQ=${OPCACHE_REVALIDATE_FREQ:-2}
29 | export OPCACHE_MAX_FILES=${OPCACHE_MAX_FILES:-4000}
30 |
31 | export PHPRC=${PHPRC:-${PHP_SYSCONF_PATH}/php.ini}
32 | export PHP_INI_SCAN_DIR=${PHP_INI_SCAN_DIR:-${PHP_SYSCONF_PATH}/php.d}
33 |
34 | envsubst < /opt/app-root/etc/php.ini.template > ${PHP_SYSCONF_PATH}/php.ini
35 | envsubst < /opt/app-root/etc/php.d/10-opcache.ini.template > ${PHP_SYSCONF_PATH}/php.d/10-opcache.ini
36 |
37 | export HTTPD_START_SERVERS=${HTTPD_START_SERVERS:-8}
38 | export HTTPD_MAX_SPARE_SERVERS=$((HTTPD_START_SERVERS+10))
39 | export HTTPD_MAX_REQUESTS_PER_CHILD=${HTTPD_MAX_REQUESTS_PER_CHILD:-4000}
40 | export HTTPD_MAX_KEEPALIVE_REQUESTS=${HTTPD_MAX_KEEPALIVE_REQUESTS:-100}
41 |
42 | if [ -n "${NO_MEMORY_LIMIT:-}" -o -z "${MEMORY_LIMIT_IN_BYTES:-}" ]; then
43 | #
44 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-256}
45 | else
46 | # A simple calculation for MaxRequestWorkers would be: Total Memory / Size Per Apache process.
47 | # The total memory is determined from the Cgroups and the average size for the
48 | # Apache process is estimated to 15MB.
49 | max_clients_computed=$((MEMORY_LIMIT_IN_BYTES/1024/1024/15))
50 | # The MaxClients should never be lower than StartServers, which is set to 5.
51 | # In case the container has memory limit set to <64M we pin the MaxClients to 4.
52 | [[ $max_clients_computed -le 4 ]] && max_clients_computed=4
53 | export HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS:-$max_clients_computed}
54 | echo "-> Cgroups memory limit is set, using HTTPD_MAX_REQUEST_WORKERS=${HTTPD_MAX_REQUEST_WORKERS}"
55 | fi
56 |
57 |
58 |
59 | if [ "x$PLATFORM" == "xel10" ] || [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
60 | if [ -n "${PHP_FPM_RUN_DIR:-}" ]; then
61 | /bin/ln -s /dev/stderr ${PHP_FPM_LOG_PATH}/error.log
62 | mkdir -p ${PHP_FPM_RUN_DIR}
63 | chmod -R a+rwx ${PHP_FPM_RUN_DIR}
64 | chown -R 1001:0 ${PHP_FPM_RUN_DIR}
65 | mkdir -p ${PHP_FPM_LOG_PATH}
66 | chmod -R a+rwx ${PHP_FPM_LOG_PATH}
67 | chown -R 1001:0 ${PHP_FPM_LOG_PATH}
68 | fi
69 | if [ "${PHP_CLEAR_ENV:-ON}" == "OFF" ]; then
70 | echo "Setting clear_env to no in assemble script"
71 | sed -e 's/^[;]*\s*clear_env\s*=.*$/clear_env = no/' -i ${PHP_FPM_CONF_D_PATH}/${PHP_FPM_CONF_FILE}
72 | fi
73 | fi
74 |
75 | # pre-start files
76 | process_extending_files ${APP_DATA}/php-pre-start/ ${PHP_CONTAINER_SCRIPTS_PATH}/pre-start/
77 |
78 | exec httpd -D FOREGROUND
79 |
--------------------------------------------------------------------------------
/8.0/Dockerfile.rhel8:
--------------------------------------------------------------------------------
1 | FROM ubi8/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.0 \
15 | PHP_VER_SHORT=80 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi8/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi8/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum -y module enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
62 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
63 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
64 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
65 | HTTPD_VAR_RUN=/var/run/httpd \
66 | HTTPD_DATA_PATH=/var/www \
67 | HTTPD_DATA_ORIG_PATH=/var/www \
68 | HTTPD_VAR_PATH=/var
69 |
70 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
71 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
72 |
73 | # Copy extra files to the image.
74 | COPY ./root/ /
75 |
76 | # Reset permissions of filesystem to default values
77 | RUN /usr/libexec/container-setup && rpm-file-permissions
78 |
79 | USER 1001
80 |
81 | # Set the default CMD to print the usage of the language image
82 | CMD $STI_SCRIPTS_PATH/usage
83 |
--------------------------------------------------------------------------------
/8.1/Dockerfile.rhel8:
--------------------------------------------------------------------------------
1 | FROM ubi8/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.1 \
15 | PHP_VER_SHORT=81 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi8/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi8/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum -y module enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
62 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
63 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
64 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
65 | HTTPD_VAR_RUN=/var/run/httpd \
66 | HTTPD_DATA_PATH=/var/www \
67 | HTTPD_DATA_ORIG_PATH=/var/www \
68 | HTTPD_VAR_PATH=/var
69 |
70 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
71 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
72 |
73 | # Copy extra files to the image.
74 | COPY ./root/ /
75 |
76 | # Reset permissions of filesystem to default values
77 | RUN /usr/libexec/container-setup && rpm-file-permissions
78 |
79 | USER 1001
80 |
81 | # Set the default CMD to print the usage of the language image
82 | CMD $STI_SCRIPTS_PATH/usage
83 |
--------------------------------------------------------------------------------
/8.2/Dockerfile.rhel8:
--------------------------------------------------------------------------------
1 | FROM ubi8/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.2 \
15 | PHP_VER_SHORT=82 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi8/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi8/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum -y module enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
62 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
63 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
64 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
65 | HTTPD_VAR_RUN=/var/run/httpd \
66 | HTTPD_DATA_PATH=/var/www \
67 | HTTPD_DATA_ORIG_PATH=/var/www \
68 | HTTPD_VAR_PATH=/var
69 |
70 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
71 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
72 |
73 | # Copy extra files to the image.
74 | COPY ./root/ /
75 |
76 | # Reset permissions of filesystem to default values
77 | RUN /usr/libexec/container-setup && rpm-file-permissions
78 |
79 | USER 1001
80 |
81 | # Set the default CMD to print the usage of the language image
82 | CMD $STI_SCRIPTS_PATH/usage
83 |
--------------------------------------------------------------------------------
/8.3/Dockerfile.rhel8:
--------------------------------------------------------------------------------
1 | FROM ubi8/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.3 \
15 | PHP_VER_SHORT=83 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi8/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi8/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum -y module enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
62 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
63 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
64 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
65 | HTTPD_VAR_RUN=/var/run/httpd \
66 | HTTPD_DATA_PATH=/var/www \
67 | HTTPD_DATA_ORIG_PATH=/var/www \
68 | HTTPD_VAR_PATH=/var
69 |
70 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
71 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
72 |
73 | # Copy extra files to the image.
74 | COPY ./root/ /
75 |
76 | # Reset permissions of filesystem to default values
77 | RUN /usr/libexec/container-setup && rpm-file-permissions
78 |
79 | USER 1001
80 |
81 | # Set the default CMD to print the usage of the language image
82 | CMD $STI_SCRIPTS_PATH/usage
83 |
--------------------------------------------------------------------------------
/7.4/Dockerfile.rhel8:
--------------------------------------------------------------------------------
1 | FROM ubi8/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 7.4 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=7.4 \
15 | PHP_VER_SHORT=74 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi8/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi8/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-json php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum -y module enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
62 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
63 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
64 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
65 | HTTPD_VAR_RUN=/var/run/httpd \
66 | HTTPD_DATA_PATH=/var/www \
67 | HTTPD_DATA_ORIG_PATH=/var/www \
68 | HTTPD_VAR_PATH=/var
69 |
70 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
71 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
72 |
73 | # Copy extra files to the image.
74 | COPY ./root/ /
75 |
76 | # Reset permissions of filesystem to default values
77 | RUN /usr/libexec/container-setup && rpm-file-permissions
78 |
79 | USER 1001
80 |
81 | # Set the default CMD to print the usage of the language image
82 | CMD $STI_SCRIPTS_PATH/usage
83 |
--------------------------------------------------------------------------------
/8.0/Dockerfile.c9s:
--------------------------------------------------------------------------------
1 | FROM quay.io/sclorg/s2i-base-c9s:c9s
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 7.4 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.0 \
15 | PHP_VER_SHORT=80 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="sclorg/${NAME}-${PHP_VER_SHORT}-c9s" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app sclorg/${NAME}-${PHP_VER_SHORT}-c9s sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
50 | yum reinstall -y tzdata && \
51 | rpm -V $INSTALL_PKGS && \
52 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
53 | yum -y clean all --enablerepo='*'
54 |
55 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
56 | APP_DATA=${APP_ROOT}/src \
57 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
58 | PHP_SYSCONF_PATH=/etc \
59 | PHP_HTTPD_CONF_FILE=php.conf \
60 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
61 | PHP_FPM_CONF_FILE=www.conf \
62 | PHP_FPM_RUN_DIR=/run/php-fpm \
63 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
64 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
65 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
66 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
67 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
68 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
69 | HTTPD_VAR_RUN=/var/run/httpd \
70 | HTTPD_DATA_PATH=/var/www \
71 | HTTPD_DATA_ORIG_PATH=/var/www \
72 | HTTPD_VAR_PATH=/var
73 |
74 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
75 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
76 |
77 | # Copy extra files to the image.
78 | COPY ./root/ /
79 |
80 | # Reset permissions of filesystem to default values
81 | RUN /usr/libexec/container-setup && rpm-file-permissions
82 |
83 | USER 1001
84 |
85 | # Set the default CMD to print the usage of the language image
86 | CMD $STI_SCRIPTS_PATH/usage
87 |
--------------------------------------------------------------------------------
/8.1/Dockerfile.c9s:
--------------------------------------------------------------------------------
1 | FROM quay.io/sclorg/s2i-base-c9s:c9s
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 7.4 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.1 \
15 | PHP_VER_SHORT=81 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="sclorg/${NAME}-${PHP_VER_SHORT}-c9s" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app sclorg/${NAME}-${PHP_VER_SHORT}-c9s sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum module -y enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
62 | PHP_FPM_CONF_FILE=www.conf \
63 | PHP_FPM_RUN_DIR=/run/php-fpm \
64 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
65 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
66 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
67 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
68 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
69 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
70 | HTTPD_VAR_RUN=/var/run/httpd \
71 | HTTPD_DATA_PATH=/var/www \
72 | HTTPD_DATA_ORIG_PATH=/var/www \
73 | HTTPD_VAR_PATH=/var
74 |
75 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
76 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
77 |
78 | # Copy extra files to the image.
79 | COPY ./root/ /
80 |
81 | # Reset permissions of filesystem to default values
82 | RUN /usr/libexec/container-setup && rpm-file-permissions
83 |
84 | USER 1001
85 |
86 | # Set the default CMD to print the usage of the language image
87 | CMD $STI_SCRIPTS_PATH/usage
88 |
--------------------------------------------------------------------------------
/8.2/Dockerfile.c9s:
--------------------------------------------------------------------------------
1 | FROM quay.io/sclorg/s2i-base-c9s:c9s
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 7.4 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.2 \
15 | PHP_VER_SHORT=82 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="sclorg/${NAME}-${PHP_VER_SHORT}-c9s" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app sclorg/${NAME}-${PHP_VER_SHORT}-c9s sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum module -y enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
62 | PHP_FPM_CONF_FILE=www.conf \
63 | PHP_FPM_RUN_DIR=/run/php-fpm \
64 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
65 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
66 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
67 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
68 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
69 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
70 | HTTPD_VAR_RUN=/var/run/httpd \
71 | HTTPD_DATA_PATH=/var/www \
72 | HTTPD_DATA_ORIG_PATH=/var/www \
73 | HTTPD_VAR_PATH=/var
74 |
75 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
76 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
77 |
78 | # Copy extra files to the image.
79 | COPY ./root/ /
80 |
81 | # Reset permissions of filesystem to default values
82 | RUN /usr/libexec/container-setup && rpm-file-permissions
83 |
84 | USER 1001
85 |
86 | # Set the default CMD to print the usage of the language image
87 | CMD $STI_SCRIPTS_PATH/usage
88 |
--------------------------------------------------------------------------------
/8.3/Dockerfile.rhel10:
--------------------------------------------------------------------------------
1 | FROM ubi10/s2i-base
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.3 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.3 \
15 | PHP_VER_SHORT=83 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi10/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
38 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
39 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi10/${NAME}-${PHP_VER_SHORT} sample-server" \
40 | maintainer="SoftwareCollections.org "
41 |
42 | # Install Apache httpd and PHP
43 | ARG INSTALL_PKGS="php php-fpm mod_ssl hostname"
44 | ARG INSTALL_EXTS="php-json php-mysqli php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-apcu php-zip php-redis"
48 |
49 | RUN dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS && \
50 | dnf reinstall -y tzdata && \
51 | rpm -V $INSTALL_PKGS && \
52 | php -v | grep -qe "v$PHP_VERSION\." && \
53 | echo "Found VERSION $PHP_VERSION" && \
54 | for ext in $(echo $INSTALL_EXTS | sed s/php-//g) ; do php -m | grep -qi "$ext\$"; done && \
55 | echo "Found requested extensions" && \
56 | dnf -y clean all --enablerepo='*'
57 |
58 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
59 | APP_DATA=${APP_ROOT}/src \
60 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
61 | PHP_SYSCONF_PATH=/etc \
62 | PHP_HTTPD_CONF_FILE=php.conf \
63 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
64 | PHP_FPM_CONF_FILE=www.conf \
65 | PHP_FPM_RUN_DIR=/run/php-fpm \
66 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
67 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
68 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
69 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
70 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
71 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
72 | HTTPD_VAR_RUN=/var/run/httpd \
73 | HTTPD_DATA_PATH=/var/www \
74 | HTTPD_DATA_ORIG_PATH=/var/www \
75 | HTTPD_VAR_PATH=/var
76 |
77 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
78 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
79 |
80 | # Copy extra files to the image.
81 | COPY ./root/ /
82 |
83 | # Reset permissions of filesystem to default values
84 | RUN /usr/libexec/container-setup && rpm-file-permissions
85 |
86 | USER 1001
87 |
88 | # Set the default CMD to print the usage of the language image
89 | CMD $STI_SCRIPTS_PATH/usage
90 |
--------------------------------------------------------------------------------
/8.0/Dockerfile.rhel9:
--------------------------------------------------------------------------------
1 | FROM ubi9/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.0 \
15 | PHP_VER_SHORT=80 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi9/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi9/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
50 | yum reinstall -y tzdata && \
51 | rpm -V $INSTALL_PKGS && \
52 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
53 | yum -y clean all --enablerepo='*'
54 |
55 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
56 | APP_DATA=${APP_ROOT}/src \
57 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
58 | PHP_SYSCONF_PATH=/etc \
59 | PHP_HTTPD_CONF_FILE=php.conf \
60 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
61 | PHP_FPM_CONF_FILE=www.conf \
62 | PHP_FPM_RUN_DIR=/run/php-fpm \
63 | PHP_CLEAR_ENV=ON \
64 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
65 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
66 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
67 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
68 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
69 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
70 | HTTPD_VAR_RUN=/var/run/httpd \
71 | HTTPD_DATA_PATH=/var/www \
72 | HTTPD_DATA_ORIG_PATH=/var/www \
73 | HTTPD_VAR_PATH=/var
74 |
75 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
76 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
77 |
78 | # Copy extra files to the image.
79 | COPY ./root/ /
80 |
81 | # Reset permissions of filesystem to default values
82 | RUN /usr/libexec/container-setup && rpm-file-permissions
83 |
84 | # RPM uses a wrong file in the config
85 | # Related: https://bugzilla.redhat.com/show_bug.cgi?id=2092356
86 | RUN sed -i "s/mod_php7.c/mod_php.c/" /etc/httpd/conf.d/php.conf
87 |
88 | USER 1001
89 |
90 | # Set the default CMD to print the usage of the language image
91 | CMD $STI_SCRIPTS_PATH/usage
92 |
--------------------------------------------------------------------------------
/8.3/Dockerfile.c10s:
--------------------------------------------------------------------------------
1 | FROM quay.io/sclorg/s2i-base-c10s:c10s
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 7.4 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.3 \
15 | PHP_VER_SHORT=83 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="sclorg/${NAME}-${PHP_VER_SHORT}-c10s" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app sclorg/${NAME}-${PHP_VER_SHORT}-c10s sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm mod_ssl hostname"
45 | ARG INSTALL_EXTS="php-json php-mysqli php-pgsql php-bcmath \
46 | php-gd php-intl php-ldap php-mbstring php-pdo \
47 | php-process php-soap php-opcache php-xml \
48 | php-gmp php-apcu php-zip php-redis"
49 |
50 | RUN dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS && \
51 | dnf reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && \
54 | echo "Found VERSION $PHP_VERSION" && \
55 | for ext in $(echo $INSTALL_EXTS | sed s/php-//g) ; do php -m | grep -qi "$ext\$"; done && \
56 | echo "Found requested extensions" && \
57 | dnf -y clean all --enablerepo='*'
58 |
59 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
60 | APP_DATA=${APP_ROOT}/src \
61 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
62 | PHP_SYSCONF_PATH=/etc \
63 | PHP_HTTPD_CONF_FILE=php.conf \
64 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
65 | PHP_FPM_CONF_FILE=www.conf \
66 | PHP_FPM_RUN_DIR=/run/php-fpm \
67 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
68 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
69 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
70 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
71 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
72 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
73 | HTTPD_VAR_RUN=/var/run/httpd \
74 | HTTPD_DATA_PATH=/var/www \
75 | HTTPD_DATA_ORIG_PATH=/var/www \
76 | HTTPD_VAR_PATH=/var
77 |
78 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
79 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
80 |
81 | # Copy extra files to the image.
82 | COPY ./root/ /
83 |
84 | # Reset permissions of filesystem to default values
85 | RUN /usr/libexec/container-setup && rpm-file-permissions
86 |
87 | USER 1001
88 |
89 | # Set the default CMD to print the usage of the language image
90 | CMD $STI_SCRIPTS_PATH/usage
91 |
--------------------------------------------------------------------------------
/8.1/Dockerfile.rhel9:
--------------------------------------------------------------------------------
1 | FROM ubi9/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.1 \
15 | PHP_VER_SHORT=81 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi9/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi9/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum module -y enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
62 | PHP_FPM_CONF_FILE=www.conf \
63 | PHP_FPM_RUN_DIR=/run/php-fpm \
64 | PHP_CLEAR_ENV=ON \
65 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
66 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
67 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
68 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
69 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
70 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
71 | HTTPD_VAR_RUN=/var/run/httpd \
72 | HTTPD_DATA_PATH=/var/www \
73 | HTTPD_DATA_ORIG_PATH=/var/www \
74 | HTTPD_VAR_PATH=/var
75 |
76 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
77 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
78 |
79 | # Copy extra files to the image.
80 | COPY ./root/ /
81 |
82 | # Reset permissions of filesystem to default values
83 | RUN /usr/libexec/container-setup && rpm-file-permissions
84 |
85 | # RPM uses a wrong file in the config
86 | # Related: https://bugzilla.redhat.com/show_bug.cgi?id=2092356
87 | RUN sed -i "s/mod_php7.c/mod_php.c/" /etc/httpd/conf.d/php.conf
88 |
89 | USER 1001
90 |
91 | # Set the default CMD to print the usage of the language image
92 | CMD $STI_SCRIPTS_PATH/usage
93 |
--------------------------------------------------------------------------------
/8.2/Dockerfile.rhel9:
--------------------------------------------------------------------------------
1 | FROM ubi9/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.2 \
15 | PHP_VER_SHORT=82 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi9/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi9/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm php-mysqlnd php-pgsql php-bcmath \
45 | php-gd php-intl php-ldap php-mbstring php-pdo \
46 | php-process php-soap php-opcache php-xml \
47 | php-gmp php-pecl-apcu php-pecl-zip mod_ssl hostname"
48 |
49 | RUN yum module -y enable php:$PHP_VERSION && \
50 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51 | yum reinstall -y tzdata && \
52 | rpm -V $INSTALL_PKGS && \
53 | php -v | grep -qe "v$PHP_VERSION\." && echo "Found VERSION $PHP_VERSION" && \
54 | yum -y clean all --enablerepo='*'
55 |
56 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
57 | APP_DATA=${APP_ROOT}/src \
58 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
59 | PHP_SYSCONF_PATH=/etc \
60 | PHP_HTTPD_CONF_FILE=php.conf \
61 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
62 | PHP_FPM_CONF_FILE=www.conf \
63 | PHP_FPM_RUN_DIR=/run/php-fpm \
64 | PHP_CLEAR_ENV=ON \
65 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
66 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
67 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
68 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
69 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
70 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
71 | HTTPD_VAR_RUN=/var/run/httpd \
72 | HTTPD_DATA_PATH=/var/www \
73 | HTTPD_DATA_ORIG_PATH=/var/www \
74 | HTTPD_VAR_PATH=/var
75 |
76 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
77 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
78 |
79 | # Copy extra files to the image.
80 | COPY ./root/ /
81 |
82 | # Reset permissions of filesystem to default values
83 | RUN /usr/libexec/container-setup && rpm-file-permissions
84 |
85 | # RPM uses a wrong file in the config
86 | # Related: https://bugzilla.redhat.com/show_bug.cgi?id=2092356
87 | RUN sed -i "s/mod_php7.c/mod_php.c/" /etc/httpd/conf.d/php.conf
88 |
89 | USER 1001
90 |
91 | # Set the default CMD to print the usage of the language image
92 | CMD $STI_SCRIPTS_PATH/usage
93 |
--------------------------------------------------------------------------------
/8.3/Dockerfile.c9s:
--------------------------------------------------------------------------------
1 | FROM quay.io/sclorg/s2i-base-c9s:c9s
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 7.4 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.3 \
15 | PHP_VER_SHORT=83 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="sclorg/${NAME}-${PHP_VER_SHORT}-c9s" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app sclorg/${NAME}-${PHP_VER_SHORT}-c9s sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm mod_ssl hostname"
45 | ARG INSTALL_EXTS="php-json php-mysqli php-pgsql php-bcmath \
46 | php-gd php-intl php-ldap php-mbstring php-pdo \
47 | php-process php-soap php-opcache php-xml \
48 | php-gmp php-apcu php-zip php-redis"
49 |
50 | RUN dnf module -y enable php:$PHP_VERSION && \
51 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS && \
52 | dnf reinstall -y tzdata && \
53 | rpm -V $INSTALL_PKGS && \
54 | php -v | grep -qe "v$PHP_VERSION\." && \
55 | echo "Found VERSION $PHP_VERSION" && \
56 | for ext in $(echo $INSTALL_EXTS | sed s/php-//g) ; do php -m | grep -qi "$ext\$"; done && \
57 | echo "Found requested extensions" && \
58 | dnf -y clean all --enablerepo='*'
59 |
60 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
61 | APP_DATA=${APP_ROOT}/src \
62 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
63 | PHP_SYSCONF_PATH=/etc \
64 | PHP_HTTPD_CONF_FILE=php.conf \
65 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
66 | PHP_FPM_CONF_FILE=www.conf \
67 | PHP_FPM_RUN_DIR=/run/php-fpm \
68 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
69 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
70 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
71 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
72 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
73 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
74 | HTTPD_VAR_RUN=/var/run/httpd \
75 | HTTPD_DATA_PATH=/var/www \
76 | HTTPD_DATA_ORIG_PATH=/var/www \
77 | HTTPD_VAR_PATH=/var
78 |
79 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
80 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
81 |
82 | # Copy extra files to the image.
83 | COPY ./root/ /
84 |
85 | # Reset permissions of filesystem to default values
86 | RUN /usr/libexec/container-setup && rpm-file-permissions
87 |
88 | USER 1001
89 |
90 | # Set the default CMD to print the usage of the language image
91 | CMD $STI_SCRIPTS_PATH/usage
92 |
--------------------------------------------------------------------------------
/8.3/Dockerfile.rhel9:
--------------------------------------------------------------------------------
1 | FROM ubi9/s2i-base:1
2 |
3 | # This image provides an Apache+PHP environment for running PHP
4 | # applications.
5 |
6 | EXPOSE 8080
7 | EXPOSE 8443
8 |
9 | # Description
10 | # This image provides an Apache 2.4 + PHP 8.0 environment for running PHP applications.
11 | # Exposed ports:
12 | # * 8080 - alternative port for http
13 |
14 | ENV PHP_VERSION=8.3 \
15 | PHP_VER_SHORT=83 \
16 | NAME=php
17 |
18 | ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
19 | DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
20 | building and running various PHP $PHP_VERSION applications and frameworks. \
21 | PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
22 | to write dynamically generated web pages. PHP also offers built-in database integration \
23 | for several commercial and non-commercial database management systems, so writing \
24 | a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
25 | is probably as a replacement for CGI scripts."
26 |
27 | LABEL summary="${SUMMARY}" \
28 | description="${DESCRIPTION}" \
29 | io.k8s.description="${DESCRIPTION}" \
30 | io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
31 | io.openshift.expose-services="8080:http" \
32 | io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
33 | io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
34 | io.s2i.scripts-url="image:///usr/libexec/s2i" \
35 | name="ubi9/${NAME}-${PHP_VER_SHORT}" \
36 | com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
37 | version="1" \
38 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
39 | help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
40 | usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app ubi9/${NAME}-${PHP_VER_SHORT} sample-server" \
41 | maintainer="SoftwareCollections.org "
42 |
43 | # Install Apache httpd and PHP
44 | ARG INSTALL_PKGS="php php-fpm mod_ssl hostname"
45 | ARG INSTALL_EXTS="php-json php-mysqli php-pgsql php-bcmath \
46 | php-gd php-intl php-ldap php-mbstring php-pdo \
47 | php-process php-soap php-opcache php-xml \
48 | php-gmp php-apcu php-zip php-redis"
49 |
50 | RUN dnf module -y enable php:$PHP_VERSION && \
51 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS && \
52 | dnf reinstall -y tzdata && \
53 | rpm -V $INSTALL_PKGS && \
54 | php -v | grep -qe "v$PHP_VERSION\." && \
55 | echo "Found VERSION $PHP_VERSION" && \
56 | for ext in $(echo $INSTALL_EXTS | sed s/php-//g) ; do php -m | grep -qi "$ext\$"; done && \
57 | echo "Found requested extensions" && \
58 | dnf -y clean all --enablerepo='*'
59 |
60 | ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
61 | APP_DATA=${APP_ROOT}/src \
62 | PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
63 | PHP_SYSCONF_PATH=/etc \
64 | PHP_HTTPD_CONF_FILE=php.conf \
65 | PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
66 | PHP_FPM_CONF_FILE=www.conf \
67 | PHP_FPM_RUN_DIR=/run/php-fpm \
68 | PHP_CLEAR_ENV=ON \
69 | PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
70 | PHP_FPM_LOG_PATH=/var/log/php-fpm \
71 | HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
72 | HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
73 | HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
74 | HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
75 | HTTPD_VAR_RUN=/var/run/httpd \
76 | HTTPD_DATA_PATH=/var/www \
77 | HTTPD_DATA_ORIG_PATH=/var/www \
78 | HTTPD_VAR_PATH=/var
79 |
80 | # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
81 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH
82 |
83 | # Copy extra files to the image.
84 | COPY ./root/ /
85 |
86 | # Reset permissions of filesystem to default values
87 | RUN /usr/libexec/container-setup && rpm-file-permissions
88 |
89 | # RPM uses a wrong file in the config
90 | # Related: https://bugzilla.redhat.com/show_bug.cgi?id=2092356
91 | RUN sed -i "s/mod_php7.c/mod_php.c/" /etc/httpd/conf.d/php.conf
92 |
93 | USER 1001
94 |
95 | # Set the default CMD to print the usage of the language image
96 | CMD $STI_SCRIPTS_PATH/usage
97 |
--------------------------------------------------------------------------------
/7.4/root/opt/app-root/etc/php.d/10-opcache.ini.template:
--------------------------------------------------------------------------------
1 | ; Enable Zend OPcache extension module
2 | zend_extension=opcache.so
3 |
4 | ; Determines if Zend OPCache is enabled
5 | opcache.enable=1
6 |
7 | ; Determines if Zend OPCache is enabled for the CLI version of PHP
8 | ;opcache.enable_cli=0
9 |
10 | ; The OPcache shared memory storage size.
11 | opcache.memory_consumption=${OPCACHE_MEMORY_CONSUMPTION}
12 |
13 | ; The amount of memory for interned strings in Mbytes.
14 | opcache.interned_strings_buffer=8
15 |
16 | ; The maximum number of keys (scripts) in the OPcache hash table.
17 | ; Only numbers between 200 and 1000000 are allowed.
18 | opcache.max_accelerated_files=${OPCACHE_MAX_FILES}
19 |
20 | ; The maximum percentage of "wasted" memory until a restart is scheduled.
21 | ;opcache.max_wasted_percentage=5
22 |
23 | ; When this directive is enabled, the OPcache appends the current working
24 | ; directory to the script key, thus eliminating possible collisions between
25 | ; files with the same name (basename). Disabling the directive improves
26 | ; performance, but may break existing applications.
27 | ;opcache.use_cwd=1
28 |
29 | ; When disabled, you must reset the OPcache manually or restart the
30 | ; webserver for changes to the filesystem to take effect.
31 | ;opcache.validate_timestamps=1
32 |
33 | ; How often (in seconds) to check file timestamps for changes to the shared
34 | ; memory storage allocation. ("1" means validate once per second, but only
35 | ; once per request. "0" means always validate)
36 | opcache.revalidate_freq=${OPCACHE_REVALIDATE_FREQ}
37 |
38 | ; Enables or disables file search in include_path optimization
39 | ;opcache.revalidate_path=0
40 |
41 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the
42 | ; size of the optimized code.
43 | ;opcache.save_comments=1
44 |
45 | ; If enabled, a fast shutdown sequence is used for the accelerated code
46 | ; Depending on the used Memory Manager this may cause some incompatibilities.
47 | ;opcache.fast_shutdown=0
48 |
49 | ; Allow file existence override (file_exists, etc.) performance feature.
50 | ;opcache.enable_file_override=0
51 |
52 | ; A bitmask, where each bit enables or disables the appropriate OPcache
53 | ; passes
54 | ;opcache.optimization_level=0xffffffff
55 |
56 | ;opcache.inherited_hack=1
57 | ;opcache.dups_fix=0
58 |
59 | ; The location of the OPcache blacklist file (wildcards allowed).
60 | ; Each OPcache blacklist file is a text file that holds the names of files
61 | ; that should not be accelerated.
62 | opcache.blacklist_filename=${PHP_SYSCONF_PATH}/php.d/opcache*.blacklist
63 |
64 | ; Allows exclusion of large files from being cached. By default all files
65 | ; are cached.
66 | opcache.max_file_size=1M
67 |
68 | ; Check the cache checksum each N requests.
69 | ; The default value of "0" means that the checks are disabled.
70 | ;opcache.consistency_checks=0
71 |
72 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache
73 | ; is not being accessed.
74 | ;opcache.force_restart_timeout=180
75 |
76 | ; OPcache error_log file name. Empty string assumes "stderr".
77 | ;opcache.error_log=
78 |
79 | ; All OPcache errors go to the Web server log.
80 | ; By default, only fatal errors (level 0) or errors (level 1) are logged.
81 | ; You can also enable warnings (level 2), info messages (level 3) or
82 | ; debug messages (level 4).
83 | ;opcache.log_verbosity_level=1
84 |
85 | ; Preferred Shared Memory back-end. Leave empty and let the system decide.
86 | ;opcache.preferred_memory_model=
87 |
88 | ; Protect the shared memory from unexpected writing during script execution.
89 | ; Useful for internal debugging only.
90 | ;opcache.protect_memory=0
91 |
92 | ; Allows calling OPcache API functions only from PHP scripts which path is
93 | ; started from specified string. The default "" means no restriction
94 | ;opcache.restrict_api=
95 |
96 | ; Enables and sets the second level cache directory.
97 | ; It should improve performance when SHM memory is full, at server restart or
98 | ; SHM reset. The default "" disables file based caching.
99 | ; RPM note : file cache directory must be owned by process owner
100 | ; for mod_php, see /etc/httpd/conf.d/php.conf
101 | ; for php-fpm, see /etc/php-fpm.d/*conf
102 | ;opcache.file_cache=
103 |
104 | ; Enables or disables opcode caching in shared memory.
105 | ;opcache.file_cache_only=0
106 |
107 | ; Enables or disables checksum validation when script loaded from file cache.
108 | ;opcache.file_cache_consistency_checks=1
109 |
110 |
111 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
112 | ; This should improve performance, but requires appropriate OS configuration.
113 | ;opcache.huge_code_pages=0
114 |
115 |
--------------------------------------------------------------------------------
/8.0/root/opt/app-root/etc/php.d/10-opcache.ini.template:
--------------------------------------------------------------------------------
1 | ; Enable Zend OPcache extension module
2 | zend_extension=opcache.so
3 |
4 | ; Determines if Zend OPCache is enabled
5 | opcache.enable=1
6 |
7 | ; Determines if Zend OPCache is enabled for the CLI version of PHP
8 | ;opcache.enable_cli=0
9 |
10 | ; The OPcache shared memory storage size.
11 | opcache.memory_consumption=${OPCACHE_MEMORY_CONSUMPTION}
12 |
13 | ; The amount of memory for interned strings in Mbytes.
14 | opcache.interned_strings_buffer=8
15 |
16 | ; The maximum number of keys (scripts) in the OPcache hash table.
17 | ; Only numbers between 200 and 1000000 are allowed.
18 | opcache.max_accelerated_files=${OPCACHE_MAX_FILES}
19 |
20 | ; The maximum percentage of "wasted" memory until a restart is scheduled.
21 | ;opcache.max_wasted_percentage=5
22 |
23 | ; When this directive is enabled, the OPcache appends the current working
24 | ; directory to the script key, thus eliminating possible collisions between
25 | ; files with the same name (basename). Disabling the directive improves
26 | ; performance, but may break existing applications.
27 | ;opcache.use_cwd=1
28 |
29 | ; When disabled, you must reset the OPcache manually or restart the
30 | ; webserver for changes to the filesystem to take effect.
31 | ;opcache.validate_timestamps=1
32 |
33 | ; How often (in seconds) to check file timestamps for changes to the shared
34 | ; memory storage allocation. ("1" means validate once per second, but only
35 | ; once per request. "0" means always validate)
36 | opcache.revalidate_freq=${OPCACHE_REVALIDATE_FREQ}
37 |
38 | ; Enables or disables file search in include_path optimization
39 | ;opcache.revalidate_path=0
40 |
41 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the
42 | ; size of the optimized code.
43 | ;opcache.save_comments=1
44 |
45 | ; If enabled, a fast shutdown sequence is used for the accelerated code
46 | ; Depending on the used Memory Manager this may cause some incompatibilities.
47 | ;opcache.fast_shutdown=0
48 |
49 | ; Allow file existence override (file_exists, etc.) performance feature.
50 | ;opcache.enable_file_override=0
51 |
52 | ; A bitmask, where each bit enables or disables the appropriate OPcache
53 | ; passes
54 | ;opcache.optimization_level=0xffffffff
55 |
56 | ;opcache.inherited_hack=1
57 | ;opcache.dups_fix=0
58 |
59 | ; The location of the OPcache blacklist file (wildcards allowed).
60 | ; Each OPcache blacklist file is a text file that holds the names of files
61 | ; that should not be accelerated.
62 | opcache.blacklist_filename=${PHP_SYSCONF_PATH}/php.d/opcache*.blacklist
63 |
64 | ; Allows exclusion of large files from being cached. By default all files
65 | ; are cached.
66 | opcache.max_file_size=1M
67 |
68 | ; Check the cache checksum each N requests.
69 | ; The default value of "0" means that the checks are disabled.
70 | ;opcache.consistency_checks=0
71 |
72 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache
73 | ; is not being accessed.
74 | ;opcache.force_restart_timeout=180
75 |
76 | ; OPcache error_log file name. Empty string assumes "stderr".
77 | ;opcache.error_log=
78 |
79 | ; All OPcache errors go to the Web server log.
80 | ; By default, only fatal errors (level 0) or errors (level 1) are logged.
81 | ; You can also enable warnings (level 2), info messages (level 3) or
82 | ; debug messages (level 4).
83 | ;opcache.log_verbosity_level=1
84 |
85 | ; Preferred Shared Memory back-end. Leave empty and let the system decide.
86 | ;opcache.preferred_memory_model=
87 |
88 | ; Protect the shared memory from unexpected writing during script execution.
89 | ; Useful for internal debugging only.
90 | ;opcache.protect_memory=0
91 |
92 | ; Allows calling OPcache API functions only from PHP scripts which path is
93 | ; started from specified string. The default "" means no restriction
94 | ;opcache.restrict_api=
95 |
96 | ; Enables and sets the second level cache directory.
97 | ; It should improve performance when SHM memory is full, at server restart or
98 | ; SHM reset. The default "" disables file based caching.
99 | ; RPM note : file cache directory must be owned by process owner
100 | ; for mod_php, see /etc/httpd/conf.d/php.conf
101 | ; for php-fpm, see /etc/php-fpm.d/*conf
102 | ;opcache.file_cache=
103 |
104 | ; Enables or disables opcode caching in shared memory.
105 | ;opcache.file_cache_only=0
106 |
107 | ; Enables or disables checksum validation when script loaded from file cache.
108 | ;opcache.file_cache_consistency_checks=1
109 |
110 |
111 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
112 | ; This should improve performance, but requires appropriate OS configuration.
113 | ;opcache.huge_code_pages=0
114 |
115 |
--------------------------------------------------------------------------------
/8.1/root/opt/app-root/etc/php.d/10-opcache.ini.template:
--------------------------------------------------------------------------------
1 | ; Enable Zend OPcache extension module
2 | zend_extension=opcache.so
3 |
4 | ; Determines if Zend OPCache is enabled
5 | opcache.enable=1
6 |
7 | ; Determines if Zend OPCache is enabled for the CLI version of PHP
8 | ;opcache.enable_cli=0
9 |
10 | ; The OPcache shared memory storage size.
11 | opcache.memory_consumption=${OPCACHE_MEMORY_CONSUMPTION}
12 |
13 | ; The amount of memory for interned strings in Mbytes.
14 | opcache.interned_strings_buffer=8
15 |
16 | ; The maximum number of keys (scripts) in the OPcache hash table.
17 | ; Only numbers between 200 and 1000000 are allowed.
18 | opcache.max_accelerated_files=${OPCACHE_MAX_FILES}
19 |
20 | ; The maximum percentage of "wasted" memory until a restart is scheduled.
21 | ;opcache.max_wasted_percentage=5
22 |
23 | ; When this directive is enabled, the OPcache appends the current working
24 | ; directory to the script key, thus eliminating possible collisions between
25 | ; files with the same name (basename). Disabling the directive improves
26 | ; performance, but may break existing applications.
27 | ;opcache.use_cwd=1
28 |
29 | ; When disabled, you must reset the OPcache manually or restart the
30 | ; webserver for changes to the filesystem to take effect.
31 | ;opcache.validate_timestamps=1
32 |
33 | ; How often (in seconds) to check file timestamps for changes to the shared
34 | ; memory storage allocation. ("1" means validate once per second, but only
35 | ; once per request. "0" means always validate)
36 | opcache.revalidate_freq=${OPCACHE_REVALIDATE_FREQ}
37 |
38 | ; Enables or disables file search in include_path optimization
39 | ;opcache.revalidate_path=0
40 |
41 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the
42 | ; size of the optimized code.
43 | ;opcache.save_comments=1
44 |
45 | ; If enabled, a fast shutdown sequence is used for the accelerated code
46 | ; Depending on the used Memory Manager this may cause some incompatibilities.
47 | ;opcache.fast_shutdown=0
48 |
49 | ; Allow file existence override (file_exists, etc.) performance feature.
50 | ;opcache.enable_file_override=0
51 |
52 | ; A bitmask, where each bit enables or disables the appropriate OPcache
53 | ; passes
54 | ;opcache.optimization_level=0xffffffff
55 |
56 | ;opcache.inherited_hack=1
57 | ;opcache.dups_fix=0
58 |
59 | ; The location of the OPcache blacklist file (wildcards allowed).
60 | ; Each OPcache blacklist file is a text file that holds the names of files
61 | ; that should not be accelerated.
62 | opcache.blacklist_filename=${PHP_SYSCONF_PATH}/php.d/opcache*.blacklist
63 |
64 | ; Allows exclusion of large files from being cached. By default all files
65 | ; are cached.
66 | opcache.max_file_size=1M
67 |
68 | ; Check the cache checksum each N requests.
69 | ; The default value of "0" means that the checks are disabled.
70 | ;opcache.consistency_checks=0
71 |
72 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache
73 | ; is not being accessed.
74 | ;opcache.force_restart_timeout=180
75 |
76 | ; OPcache error_log file name. Empty string assumes "stderr".
77 | ;opcache.error_log=
78 |
79 | ; All OPcache errors go to the Web server log.
80 | ; By default, only fatal errors (level 0) or errors (level 1) are logged.
81 | ; You can also enable warnings (level 2), info messages (level 3) or
82 | ; debug messages (level 4).
83 | ;opcache.log_verbosity_level=1
84 |
85 | ; Preferred Shared Memory back-end. Leave empty and let the system decide.
86 | ;opcache.preferred_memory_model=
87 |
88 | ; Protect the shared memory from unexpected writing during script execution.
89 | ; Useful for internal debugging only.
90 | ;opcache.protect_memory=0
91 |
92 | ; Allows calling OPcache API functions only from PHP scripts which path is
93 | ; started from specified string. The default "" means no restriction
94 | ;opcache.restrict_api=
95 |
96 | ; Enables and sets the second level cache directory.
97 | ; It should improve performance when SHM memory is full, at server restart or
98 | ; SHM reset. The default "" disables file based caching.
99 | ; RPM note : file cache directory must be owned by process owner
100 | ; for mod_php, see /etc/httpd/conf.d/php.conf
101 | ; for php-fpm, see /etc/php-fpm.d/*conf
102 | ;opcache.file_cache=
103 |
104 | ; Enables or disables opcode caching in shared memory.
105 | ;opcache.file_cache_only=0
106 |
107 | ; Enables or disables checksum validation when script loaded from file cache.
108 | ;opcache.file_cache_consistency_checks=1
109 |
110 |
111 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
112 | ; This should improve performance, but requires appropriate OS configuration.
113 | ;opcache.huge_code_pages=0
114 |
115 |
--------------------------------------------------------------------------------