From 6179dbf6d08eddeb11a59cb566baf013604113fa Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 00:22:43 +0800 Subject: [PATCH 01/13] feat(planner/php): Put octaneServer in planMeta --- internal/php/identify.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/internal/php/identify.go b/internal/php/identify.go index ce5ee769..6a73f8dd 100644 --- a/internal/php/identify.go +++ b/internal/php/identify.go @@ -26,18 +26,29 @@ func (i *identify) Match(fs afero.Fs) bool { } func (i *identify) PlanMeta(options plan.NewPlannerOptions) types.PlanMeta { + config := options.Config + framework := DetermineProjectFramework(options.Source) phpVersion := GetPHPVersion(options.Source) deps := DetermineAptDependencies(options.Source) app, property := DetermineApplication(options.Source) - return types.PlanMeta{ + // Some meta will be added to the plan dynamically later. + meta := types.PlanMeta{ "framework": string(framework), "phpVersion": phpVersion, "deps": strings.Join(deps, " "), "app": string(app), "property": PropertyToString(property), } + + if framework == types.PHPFrameworkLaravel { + if runner := config.GetString("laravel.octane.server"); runner != "" { + meta["octaneServer"] = runner + } + } + + return meta } var _ plan.Identifier = (*identify)(nil) From ec7cd1b2a9a2f4a1c2f9b385411a33f8087c9420 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 00:25:35 +0800 Subject: [PATCH 02/13] test(planner/php): Add template test for PHP --- internal/php/template_test.go | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 internal/php/template_test.go diff --git a/internal/php/template_test.go b/internal/php/template_test.go new file mode 100644 index 00000000..d8d41df5 --- /dev/null +++ b/internal/php/template_test.go @@ -0,0 +1,66 @@ +package php_test + +import ( + "testing" + + "github.com/gkampitakis/go-snaps/snaps" + "github.com/stretchr/testify/assert" + "github.com/zeabur/zbpack/internal/php" + "github.com/zeabur/zbpack/pkg/types" +) + +func TestTemplate(t *testing.T) { + phpVersion := []string{ + "8.1", + "8.2", + "7", + } + framework := []string{ + string(types.PHPFrameworkNone), + string(types.PHPFrameworkLaravel), + string(types.PHPFrameworkThinkphp), + string(types.PHPFrameworkCodeigniter), + } + deps := []string{ + "nginx", + "nginx,owo", + } + property := []string{ + php.PropertyToString(types.PHPPropertyNone), + php.PropertyToString(types.PHPPropertyComposer), + } + + for _, v := range phpVersion { + for _, d := range deps { + for _, f := range framework { + for _, p := range property { + t.Run(v+"-"+f+"-"+d+"-"+p, func(t *testing.T) { + dockerfile, err := php.GenerateDockerfile(types.PlanMeta{ + "phpVersion": v, + "framework": f, + "deps": d, + "app": string(types.PHPApplicationDefault), + "property": p, + }) + + assert.NoError(t, err) + snaps.MatchSnapshot(t, dockerfile) + }) + } + } + } + } +} + +func TestTemplate_AcgFaka(t *testing.T) { + dockerfile, err := php.GenerateDockerfile(types.PlanMeta{ + "phpVersion": "8.2", + "framework": string(types.PHPFrameworkLaravel), + "deps": "nginx", + "app": string(types.PHPApplicationAcgFaka), + "property": php.PropertyToString(types.PHPPropertyComposer), + }) + + assert.NoError(t, err) + snaps.MatchSnapshot(t, dockerfile) +} From bc4602f744ebe854d455b6a998f36c0da25d5349 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 00:27:44 +0800 Subject: [PATCH 03/13] test(planner/php): Parallelize template test --- internal/php/template_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/php/template_test.go b/internal/php/template_test.go index d8d41df5..dc60bd04 100644 --- a/internal/php/template_test.go +++ b/internal/php/template_test.go @@ -10,6 +10,8 @@ import ( ) func TestTemplate(t *testing.T) { + t.Parallel() + phpVersion := []string{ "8.1", "8.2", @@ -35,6 +37,8 @@ func TestTemplate(t *testing.T) { for _, f := range framework { for _, p := range property { t.Run(v+"-"+f+"-"+d+"-"+p, func(t *testing.T) { + t.Parallel() + dockerfile, err := php.GenerateDockerfile(types.PlanMeta{ "phpVersion": v, "framework": f, @@ -53,6 +57,8 @@ func TestTemplate(t *testing.T) { } func TestTemplate_AcgFaka(t *testing.T) { + t.Parallel() + dockerfile, err := php.GenerateDockerfile(types.PlanMeta{ "phpVersion": "8.2", "framework": string(types.PHPFrameworkLaravel), From 17b460fc61e5a491a8382fd21c03c4edd3173913 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:04:19 +0800 Subject: [PATCH 04/13] test(planner/php): Add snapshot of current Dockerfile --- internal/php/__snapshots__/template_test.snap | 1421 +++++++++++++++++ 1 file changed, 1421 insertions(+) create mode 100755 internal/php/__snapshots__/template_test.snap diff --git a/internal/php/__snapshots__/template_test.snap b/internal/php/__snapshots__/template_test.snap new file mode 100755 index 00000000..735ba746 --- /dev/null +++ b/internal/php/__snapshots__/template_test.snap @@ -0,0 +1,1421 @@ + +[TestTemplate_AcgFaka - 1] +FROM docker.io/library/php:8.2-fpm + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n if (!-e \$request_filename){\n rewrite ^(.*)\$ /index.php?s=\$1 last; break;\n }\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-none-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-none-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-thinkphp-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-laravel-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-thinkphp-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-none-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-codeigniter-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-codeigniter-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-codeigniter-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-none-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-thinkphp-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-codeigniter-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-none-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-laravel-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-codeigniter-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-thinkphp-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-none-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-codeigniter-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-codeigniter-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-thinkphp-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-thinkphp-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-thinkphp-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-laravel-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-thinkphp-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-thinkphp-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-codeigniter-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-laravel-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-none-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-none-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-none-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-none-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-thinkphp-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-thinkphp-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-codeigniter-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-none-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-codeigniter-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-none-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-codeigniter-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-thinkphp-nginx,owo-1 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-codeigniter-nginx,owo-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +\ +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- From c846bdd470fe88c9ef716ec3759f86986f713da2 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:02:30 +0800 Subject: [PATCH 05/13] feat(planner/php): Add "laravel.octane.server" config --- internal/php/config.go | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 internal/php/config.go diff --git a/internal/php/config.go b/internal/php/config.go new file mode 100644 index 00000000..2ad9dcc9 --- /dev/null +++ b/internal/php/config.go @@ -0,0 +1,7 @@ +package php + +// ConfigLaravelOctaneServer defines what server we should use to run Laravel Octane. +// +// When this config is set, we will use the corresponding server to run the project +// instead of the original Nginx + PHP-FPM stack. +const ConfigLaravelOctaneServer = "laravel.octane.server" From 2bc6264eb9b6fd9c854a4fb104f0fcae639d6819 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:01:02 +0800 Subject: [PATCH 06/13] refactor(planner/php): Don't install Nginx if server is Swoole --- internal/php/plan.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/internal/php/plan.go b/internal/php/plan.go index 4ae16d2e..3f5eb590 100644 --- a/internal/php/plan.go +++ b/internal/php/plan.go @@ -96,13 +96,22 @@ var depMap = map[string][]string{ "ext-gmp": {"libgmp-dev"}, } -var baseDep = []string{"nginx", "libicu-dev", "jq", "pkg-config", "unzip", "git"} +var baseDep = []string{"libicu-dev", "jq", "pkg-config", "unzip", "git"} // DetermineAptDependencies determines the required apt dependencies of the project. -func DetermineAptDependencies(source afero.Fs) []string { +// +// We install Nginx server unless server is "swoole". +func DetermineAptDependencies(source afero.Fs, server string) []string { // deep copy the base dependencies dependencies := append([]string{}, baseDep...) + // If Octane Server is not "swoole", we should install Nginx. + // + // TODO: support RoadRunner + if server != "swoole" { + dependencies = append(dependencies, "nginx") + } + composerJSON, err := parseComposerJSON(source) if err != nil { return dependencies From 9283fbb96fe1e69df5533eb1daa972c26b307f7e Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:01:19 +0800 Subject: [PATCH 07/13] test(planner/php): Update testcase for new server --- internal/php/plan_apt_test.go | 45 +++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/internal/php/plan_apt_test.go b/internal/php/plan_apt_test.go index dde74947..6fd6d999 100644 --- a/internal/php/plan_apt_test.go +++ b/internal/php/plan_apt_test.go @@ -1,6 +1,5 @@ package php -// due to some internal logics, we need to do blackbox test import ( "testing" @@ -8,11 +7,13 @@ import ( "github.com/stretchr/testify/assert" ) +var baseDepsWithNginx = append(baseDep, "nginx") + func TestDetermineAptDependencies_None(t *testing.T) { fs := afero.NewMemMapFs() - deps := DetermineAptDependencies(fs) - assert.Equal(t, deps, baseDep) + deps := DetermineAptDependencies(fs, "") + assert.Equal(t, baseDepsWithNginx, deps) } func TestDetermineAptDependencies_NoRequire(t *testing.T) { @@ -21,8 +22,8 @@ func TestDetermineAptDependencies_NoRequire(t *testing.T) { "name": "test" }`), 0o644) - deps := DetermineAptDependencies(fs) - assert.Equal(t, deps, baseDep) + deps := DetermineAptDependencies(fs, "") + assert.Equal(t, baseDepsWithNginx, deps) } func TestDetermineAptDependencies_EmptyRequire(t *testing.T) { @@ -32,8 +33,8 @@ func TestDetermineAptDependencies_EmptyRequire(t *testing.T) { "require": {} }`), 0o644) - deps := DetermineAptDependencies(fs) - assert.Equal(t, deps, baseDep) + deps := DetermineAptDependencies(fs, "") + assert.Equal(t, baseDepsWithNginx, deps) } func TestDetermineAptDependencies_RequireOpenssl(t *testing.T) { @@ -45,8 +46,8 @@ func TestDetermineAptDependencies_RequireOpenssl(t *testing.T) { } }`), 0o644) - deps := DetermineAptDependencies(fs) - assert.Equal(t, deps, append(baseDep, depMap["ext-openssl"]...)) + deps := DetermineAptDependencies(fs, "") + assert.Equal(t, append(baseDepsWithNginx, depMap["ext-openssl"]...), deps) } func TestDetermineAptDependencies_RequireZip(t *testing.T) { @@ -58,8 +59,8 @@ func TestDetermineAptDependencies_RequireZip(t *testing.T) { } }`), 0o644) - deps := DetermineAptDependencies(fs) - assert.Equal(t, deps, append(baseDep, depMap["ext-zip"]...)) + deps := DetermineAptDependencies(fs, "") + assert.Equal(t, append(baseDepsWithNginx, depMap["ext-zip"]...), deps) } func TestDetermineAptDependencies_RequireCurl(t *testing.T) { @@ -71,8 +72,8 @@ func TestDetermineAptDependencies_RequireCurl(t *testing.T) { } }`), 0o644) - deps := DetermineAptDependencies(fs) - assert.Equal(t, deps, append(baseDep, depMap["ext-curl"]...)) + deps := DetermineAptDependencies(fs, "") + assert.Equal(t, append(baseDepsWithNginx, depMap["ext-curl"]...), deps) } func TestDetermineAptDependencies_RequireGd(t *testing.T) { @@ -84,6 +85,20 @@ func TestDetermineAptDependencies_RequireGd(t *testing.T) { } }`), 0o644) - deps := DetermineAptDependencies(fs) - assert.Equal(t, deps, append(baseDep, depMap["ext-gd"]...)) + deps := DetermineAptDependencies(fs, "") + assert.Equal(t, append(baseDepsWithNginx, depMap["ext-gd"]...), deps) +} + +func TestDetermineAptDependencies_Swoole(t *testing.T) { + fs := afero.NewMemMapFs() + + deps := DetermineAptDependencies(fs, "swoole") + assert.Equal(t, baseDep, deps) +} + +func TestDetermineAptDependencies_Unknown(t *testing.T) { + fs := afero.NewMemMapFs() + + deps := DetermineAptDependencies(fs, "unknown") + assert.Equal(t, baseDepsWithNginx, deps) } From 1c79586d0a46ffb281abe6c0dba7c640372bd338 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:02:15 +0800 Subject: [PATCH 08/13] feat(planner/php): Pass server to AptDependencies --- internal/php/identify.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/php/identify.go b/internal/php/identify.go index 6a73f8dd..faeb6c3a 100644 --- a/internal/php/identify.go +++ b/internal/php/identify.go @@ -28,9 +28,11 @@ func (i *identify) Match(fs afero.Fs) bool { func (i *identify) PlanMeta(options plan.NewPlannerOptions) types.PlanMeta { config := options.Config + server := config.GetString(ConfigLaravelOctaneServer) + framework := DetermineProjectFramework(options.Source) phpVersion := GetPHPVersion(options.Source) - deps := DetermineAptDependencies(options.Source) + deps := DetermineAptDependencies(options.Source, server) app, property := DetermineApplication(options.Source) // Some meta will be added to the plan dynamically later. @@ -42,10 +44,8 @@ func (i *identify) PlanMeta(options plan.NewPlannerOptions) types.PlanMeta { "property": PropertyToString(property), } - if framework == types.PHPFrameworkLaravel { - if runner := config.GetString("laravel.octane.server"); runner != "" { - meta["octaneServer"] = runner - } + if framework == types.PHPFrameworkLaravel && server != "" { + meta["octaneServer"] = server } return meta From 01f2071adae3c598e101f07ac1291146958f4934 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:02:42 +0800 Subject: [PATCH 09/13] feat(planner/php): Implement dockerfile generation of Swoole --- internal/php/php.go | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/internal/php/php.go b/internal/php/php.go index 19a8df84..19908a7c 100644 --- a/internal/php/php.go +++ b/internal/php/php.go @@ -12,19 +12,25 @@ import ( func GenerateDockerfile(meta types.PlanMeta) (string, error) { phpVersion := meta["phpVersion"] projectProperty := PropertyFromString(meta["property"]) + serverMode := "fpm" getPhpImage := "FROM docker.io/library/php:" + phpVersion + "-fpm\n" - nginxConf, err := RetrieveNginxConf(meta["app"]) - if err != nil { - return "", fmt.Errorf("retrieve nginx conf: %w", err) + // Custom server for Laravel Octane + switch meta["octaneServer"] { + case "": // ignore + case "roadrunner": // unimplemented + case "swoole": + getPhpImage = "FROM docker.io/phpswoole/swoole:php" + phpVersion + "\n" + + "RUN docker-php-ext-install pcntl\n" + serverMode = "swoole" } installCMD := fmt.Sprintf(` RUN apt-get update && apt-get install -y %s && rm -rf /var/lib/apt/lists/* `, meta["deps"]) if projectProperty&types.PHPPropertyComposer != 0 { - installCMD += `\ + installCMD += ` RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -44,11 +50,18 @@ WORKDIR /var/www ` } - // generate Nginx config to let it pass the request to php-fpm - copyCommand += ` + if serverMode == "fpm" { + // generate Nginx config to let it pass the request to php-fpm + nginxConf, err := RetrieveNginxConf(meta["app"]) + if err != nil { + return "", fmt.Errorf("retrieve nginx conf: %w", err) + } + + copyCommand += ` RUN rm /etc/nginx/sites-enabled/default RUN echo "` + nginxConf + `" >> /etc/nginx/sites-enabled/default ` + } // install dependencies with composer composerInstallCmd := "\n" @@ -69,6 +82,12 @@ RUN composer install --optimize-autoloader --no-dev startCmd := ` CMD nginx; php-fpm ` + // Custom server for Laravel Octane + if serverMode == "swoole" { + startCmd = ` +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +` + } dockerFile := getPhpImage + installCMD + From a93bad95be78793061eec32d9f99b0bef427b494 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:03:17 +0800 Subject: [PATCH 10/13] test(planner/php): Add octane server testcases --- internal/php/template_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/internal/php/template_test.go b/internal/php/template_test.go index dc60bd04..0a386732 100644 --- a/internal/php/template_test.go +++ b/internal/php/template_test.go @@ -31,6 +31,11 @@ func TestTemplate(t *testing.T) { php.PropertyToString(types.PHPPropertyNone), php.PropertyToString(types.PHPPropertyComposer), } + octaneServer := []string{ + "", + "roadrunner", + "swoole", + } for _, v := range phpVersion { for _, d := range deps { @@ -50,6 +55,26 @@ func TestTemplate(t *testing.T) { assert.NoError(t, err) snaps.MatchSnapshot(t, dockerfile) }) + + if f == string(types.PHPFrameworkLaravel) { + for _, o := range octaneServer { + t.Run(v+"-"+f+"-"+d+"-"+p+"+os-"+o, func(t *testing.T) { + t.Parallel() + + dockerfile, err := php.GenerateDockerfile(types.PlanMeta{ + "phpVersion": v, + "framework": f, + "deps": d, + "app": string(types.PHPApplicationDefault), + "property": p, + "octaneServer": o, + }) + + assert.NoError(t, err) + snaps.MatchSnapshot(t, dockerfile) + }) + } + } } } } From db8020a234d98a789a2d074772b4dab1c06d7240 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 01:05:52 +0800 Subject: [PATCH 11/13] test(planner/php): Update snapshot for new Dockerfile --- internal/php/__snapshots__/template_test.snap | 1222 ++++++++++++++++- 1 file changed, 1174 insertions(+), 48 deletions(-) diff --git a/internal/php/__snapshots__/template_test.snap b/internal/php/__snapshots__/template_test.snap index 735ba746..a076181a 100755 --- a/internal/php/__snapshots__/template_test.snap +++ b/internal/php/__snapshots__/template_test.snap @@ -3,7 +3,7 @@ FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -61,7 +61,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -90,7 +90,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -119,7 +119,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -148,7 +148,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -177,7 +177,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -206,7 +206,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -235,7 +235,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -264,7 +264,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -293,7 +293,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -322,7 +322,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -351,7 +351,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -380,7 +380,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -409,7 +409,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -438,7 +438,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -467,7 +467,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -496,7 +496,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -525,7 +525,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -554,7 +554,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -583,7 +583,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -612,7 +612,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -641,7 +641,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -670,7 +670,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -699,7 +699,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -728,7 +728,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -757,7 +757,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -786,7 +786,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -815,7 +815,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -844,7 +844,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -873,7 +873,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -902,7 +902,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -931,7 +931,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -960,7 +960,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -989,7 +989,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1018,7 +1018,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1047,7 +1047,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1076,7 +1076,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1105,7 +1105,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1134,7 +1134,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1163,7 +1163,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1192,7 +1192,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1221,7 +1221,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1250,7 +1250,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1279,7 +1279,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1308,7 +1308,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1337,7 +1337,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1366,7 +1366,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1395,7 +1395,7 @@ CMD nginx; php-fpm FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -1419,3 +1419,1129 @@ RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- + +[TestTemplate/7-laravel-nginx-1+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx,owo-1+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx-0+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx,owo-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx,owo-0+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx,owo-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx,owo-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx,owo-1+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7-alpine + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev +CMD php artisan octane:start --server=swoole +--- + +[TestTemplate/8.1-laravel-nginx-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx-1+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx-0+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-laravel-nginx-1+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx,owo-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7-alpine + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev +CMD php artisan octane:start --server=swoole +--- + +[TestTemplate/8.2-laravel-nginx,owo-1+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx,owo-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7-alpine + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev +CMD php artisan octane:start --server=swoole +--- + +[TestTemplate/7-laravel-nginx,owo-1+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx,owo-1+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx,owo-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx,owo-0+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx,owo-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx,owo-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7-alpine + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev +CMD php artisan octane:start --server=swoole +--- + +[TestTemplate/8.2-laravel-nginx,owo-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx,owo-1+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx-1+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx-0+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx-1+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx,owo-0+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/7-laravel-nginx-1+os-roadrunner - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.1-none-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-none-nginx-0 - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx,owo-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx,owo-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- + +[TestTemplate/8.2-laravel-nginx,owo-0+os- - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions && sync + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN echo '#!/bin/sh\n\ +extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ +for ext in $extensions; do\n\ + echo "Installing PHP extension: $ext"\n\ + docker-php-ext-install $ext\n\ +done' > /usr/local/bin/install_php_extensions.sh \ + && chmod +x /usr/local/bin/install_php_extensions.sh \ + && /usr/local/bin/install_php_extensions.sh +RUN composer install --optimize-autoloader --no-dev + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +--- From 516543a965b42aff1d97d565382e61dc5404feb7 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 18:20:34 +0800 Subject: [PATCH 12/13] test(planner/php): Fix capture --- internal/php/template_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/php/template_test.go b/internal/php/template_test.go index 0a386732..3f3c6b13 100644 --- a/internal/php/template_test.go +++ b/internal/php/template_test.go @@ -38,9 +38,13 @@ func TestTemplate(t *testing.T) { } for _, v := range phpVersion { + v := v for _, d := range deps { + d := d for _, f := range framework { + f := f for _, p := range property { + p := p t.Run(v+"-"+f+"-"+d+"-"+p, func(t *testing.T) { t.Parallel() @@ -58,6 +62,8 @@ func TestTemplate(t *testing.T) { if f == string(types.PHPFrameworkLaravel) { for _, o := range octaneServer { + o := o + t.Run(v+"-"+f+"-"+d+"-"+p+"+os-"+o, func(t *testing.T) { t.Parallel() From c89fafd457e9c110aedbfd7cf039d9ac33ce8e9f Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 3 Oct 2023 18:21:53 +0800 Subject: [PATCH 13/13] test(planner/php): Update snapshot to be corrected --- internal/php/__snapshots__/template_test.snap | 1186 +++++++---------- 1 file changed, 474 insertions(+), 712 deletions(-) diff --git a/internal/php/__snapshots__/template_test.snap b/internal/php/__snapshots__/template_test.snap index a076181a..f2f21ef5 100755 --- a/internal/php/__snapshots__/template_test.snap +++ b/internal/php/__snapshots__/template_test.snap @@ -29,36 +29,23 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-none-nginx-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -\ -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-none-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -66,8 +53,8 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default @@ -89,7 +76,7 @@ CMD nginx; php-fpm [TestTemplate/7-thinkphp-nginx-1 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -116,38 +103,25 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -174,58 +148,32 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-thinkphp-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-none-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm @@ -261,36 +209,23 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-codeigniter-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-codeigniter-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -319,67 +254,41 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-none-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-thinkphp-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-codeigniter-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -406,42 +315,25 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-none-nginx-0 - 1] -FROM docker.io/library/php:7-fpm - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.2-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx-0 - 1] -FROM docker.io/library/php:7-fpm - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.2-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -449,22 +341,13 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -493,13 +376,9 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-codeigniter-nginx-0 - 1] -FROM docker.io/library/php:7-fpm - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.2-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -507,24 +386,15 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-thinkphp-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -551,16 +421,16 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-none-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default @@ -584,25 +454,12 @@ FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm @@ -642,34 +499,21 @@ FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-codeigniter-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -725,13 +569,9 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-thinkphp-nginx-0 - 1] -FROM docker.io/library/php:7-fpm - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.1-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -739,15 +579,6 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm @@ -758,34 +589,21 @@ FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -812,9 +630,9 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-thinkphp-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -841,7 +659,7 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-thinkphp-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -870,13 +688,9 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-codeigniter-nginx-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -884,57 +698,31 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx-0 - 1] -FROM docker.io/library/php:7-fpm - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.1-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -942,22 +730,13 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -986,16 +765,16 @@ CMD nginx; php-fpm --- [TestTemplate/8.1-none-nginx-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default @@ -1017,14 +796,14 @@ CMD nginx; php-fpm [TestTemplate/7-none-nginx-1 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default @@ -1052,8 +831,8 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default @@ -1077,25 +856,12 @@ FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm @@ -1104,11 +870,7 @@ CMD nginx; php-fpm [TestTemplate/7-thinkphp-nginx-0 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -1116,28 +878,15 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-thinkphp-nginx-0 - 1] -FROM docker.io/library/php:7-fpm - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.2-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -1145,15 +894,6 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm @@ -1162,7 +902,7 @@ CMD nginx; php-fpm [TestTemplate/7-codeigniter-nginx-1 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -1189,7 +929,7 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-none-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1197,8 +937,8 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default @@ -1220,7 +960,7 @@ CMD nginx; php-fpm [TestTemplate/7-laravel-nginx-1 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -1249,11 +989,7 @@ CMD nginx; php-fpm [TestTemplate/7-codeigniter-nginx-0 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -1261,15 +997,6 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm @@ -1278,11 +1005,7 @@ CMD nginx; php-fpm [TestTemplate/7-laravel-nginx-0 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www @@ -1290,15 +1013,6 @@ WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm @@ -1307,34 +1021,21 @@ CMD nginx; php-fpm [TestTemplate/7-none-nginx-0 - 1] FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* -COPY --chown=www-data:www-data . /var/www -WORKDIR /var/www +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/8.2-codeigniter-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1363,7 +1064,7 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-thinkphp-nginx,owo-1 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1392,39 +1093,25 @@ CMD nginx; php-fpm --- [TestTemplate/8.2-codeigniter-nginx,owo-0 - 1] -FROM docker.io/library/php:7-fpm +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www RUN rm /etc/nginx/sites-enabled/default RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD nginx; php-fpm --- [TestTemplate/7-laravel-nginx-1+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -1433,6 +1120,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1443,13 +1133,12 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx,owo-1+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1460,6 +1149,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1470,147 +1162,90 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.2-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx-0+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.2-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx,owo-0+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7 +FROM docker.io/phpswoole/swoole:php8.1 RUN docker-php-ext-install pcntl RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] --- [TestTemplate/8.1-laravel-nginx,owo-0+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx,owo-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx,owo-1+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7 +FROM docker.io/phpswoole/swoole:php8.1 RUN docker-php-ext-install pcntl RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1637,8 +1272,7 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- [TestTemplate/8.1-laravel-nginx,owo-1+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.1-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1649,6 +1283,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1659,14 +1296,15 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx-1+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7-alpine +FROM docker.io/phpswoole/swoole:php8.2 +RUN docker-php-ext-install pcntl -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -1684,14 +1322,16 @@ done' > /usr/local/bin/install_php_extensions.sh \ && chmod +x /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD php artisan octane:start --server=swoole + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + --- [TestTemplate/8.1-laravel-nginx-1+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7 +FROM docker.io/phpswoole/swoole:php8.1 RUN docker-php-ext-install pcntl -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -1715,10 +1355,9 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- [TestTemplate/8.1-laravel-nginx-1+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -1727,6 +1366,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1737,96 +1379,60 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx-0+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7 +FROM docker.io/phpswoole/swoole:php8.1 RUN docker-php-ext-install pcntl -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] --- [TestTemplate/8.1-laravel-nginx-0+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:8.1-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- [TestTemplate/8.1-laravel-nginx-1+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -1835,6 +1441,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1845,12 +1454,13 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx,owo-1+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7-alpine +FROM docker.io/phpswoole/swoole:php8.2 +RUN docker-php-ext-install pcntl RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1870,12 +1480,13 @@ done' > /usr/local/bin/install_php_extensions.sh \ && chmod +x /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD php artisan octane:start --server=swoole + +CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + --- [TestTemplate/8.2-laravel-nginx,owo-1+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1886,6 +1497,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1896,37 +1510,28 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/7-laravel-nginx,owo-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7-alpine +FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev -CMD php artisan octane:start --server=swoole +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + --- [TestTemplate/7-laravel-nginx,owo-1+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1937,6 +1542,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1947,13 +1555,12 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx,owo-1+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -1964,6 +1571,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -1974,7 +1584,7 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- @@ -2006,29 +1616,18 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- [TestTemplate/7-laravel-nginx,owo-0+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- @@ -2038,81 +1637,46 @@ RUN docker-php-ext-install pcntl RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] --- [TestTemplate/8.2-laravel-nginx,owo-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7-alpine +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev -CMD php artisan octane:start --server=swoole +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + --- [TestTemplate/8.2-laravel-nginx,owo-0+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7 +FROM docker.io/phpswoole/swoole:php8.2 RUN docker-php-ext-install pcntl RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync - COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] --- [TestTemplate/7-laravel-nginx,owo-1+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -2123,6 +1687,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -2133,15 +1700,14 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx-1+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.2-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -2150,6 +1716,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -2160,34 +1729,23 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/7-laravel-nginx-0+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl - -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +FROM docker.io/library/php:7-fpm -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] + +CMD nginx; php-fpm --- @@ -2195,34 +1753,20 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p FROM docker.io/phpswoole/swoole:php7 RUN docker-php-ext-install pcntl -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* - -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] --- [TestTemplate/8.2-laravel-nginx-1+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.2-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -2231,6 +1775,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -2241,42 +1788,61 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- [TestTemplate/8.2-laravel-nginx,owo-0+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +FROM docker.io/library/php:8.2-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions && sync +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php8.2 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* COPY --chown=www-data:www-data . /var/www WORKDIR /var/www -RUN echo '#!/bin/sh\n\ -extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ -for ext in $extensions; do\n\ - echo "Installing PHP extension: $ext"\n\ - docker-php-ext-install $ext\n\ -done' > /usr/local/bin/install_php_extensions.sh \ - && chmod +x /usr/local/bin/install_php_extensions.sh \ - && /usr/local/bin/install_php_extensions.sh -RUN composer install --optimize-autoloader --no-dev CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] --- -[TestTemplate/8.2-laravel-nginx-0+os-swoole - 1] +[TestTemplate/7-laravel-nginx-0+os- - 1] +FROM docker.io/library/php:7-fpm + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx-1+os-swoole - 1] FROM docker.io/phpswoole/swoole:php7 RUN docker-php-ext-install pcntl -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -2299,11 +1865,10 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- -[TestTemplate/7-laravel-nginx-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +[TestTemplate/7-laravel-nginx-1+os-roadrunner - 1] +FROM docker.io/library/php:7-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -2312,6 +1877,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -2322,16 +1890,64 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- -[TestTemplate/7-laravel-nginx-1+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +[TestTemplate/8.1-none-nginx-0 - 1] +FROM docker.io/library/php:8.1-fpm + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-none-nginx-0 - 1] +FROM docker.io/library/php:8.1-fpm + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www/public +WORKDIR /var/www/public + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx,owo-0+os- - 1] +FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php8.2 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -2353,8 +1969,8 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- -[TestTemplate/7-laravel-nginx-1+os-roadrunner - 1] -FROM docker.io/phpswoole/swoole:php7 +[TestTemplate/8.2-laravel-nginx,owo-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php8.2 RUN docker-php-ext-install pcntl RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* @@ -2380,11 +1996,75 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- -[TestTemplate/8.1-none-nginx-0 - 1] +[TestTemplate/8.2-laravel-nginx,owo-0+os- - 1] +FROM docker.io/library/php:8.2-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx,owo-0+os-roadrunner - 1] FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-codeigniter-nginx,owo-0 - 1] +FROM docker.io/library/php:8.2-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-codeigniter-nginx,owo-0 - 1] +FROM docker.io/library/php:8.1-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-laravel-nginx,owo-1+os-roadrunner - 1] +FROM docker.io/library/php:8.1-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -2409,11 +2089,27 @@ CMD nginx; php-fpm --- -[TestTemplate/8.1-none-nginx-0 - 1] +[TestTemplate/7-laravel-nginx,owo-0 - 1] FROM docker.io/library/php:7-fpm RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.1-laravel-nginx-1 - 1] +FROM docker.io/library/php:8.1-fpm + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && sync @@ -2438,11 +2134,10 @@ CMD nginx; php-fpm --- -[TestTemplate/7-laravel-nginx,owo-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +[TestTemplate/8.1-laravel-nginx-1+os-roadrunner - 1] +FROM docker.io/library/php:8.1-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -2451,6 +2146,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -2461,15 +2159,15 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev -CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] +CMD nginx; php-fpm --- -[TestTemplate/8.2-laravel-nginx-1+os-swoole - 1] -FROM docker.io/phpswoole/swoole:php7 +[TestTemplate/8.1-laravel-nginx-1+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php8.1 RUN docker-php-ext-install pcntl -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -2492,7 +2190,7 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- -[TestTemplate/8.2-laravel-nginx,owo-1+os-swoole - 1] +[TestTemplate/7-laravel-nginx,owo-1+os-swoole - 1] FROM docker.io/phpswoole/swoole:php7 RUN docker-php-ext-install pcntl @@ -2519,11 +2217,10 @@ CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--p --- -[TestTemplate/8.2-laravel-nginx,owo-0+os- - 1] -FROM docker.io/phpswoole/swoole:php7 -RUN docker-php-ext-install pcntl +[TestTemplate/8.2-laravel-nginx-1 - 1] +FROM docker.io/library/php:8.2-fpm -RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -2532,6 +2229,9 @@ RUN chmod +x /usr/local/bin/install-php-extensions && sync COPY --chown=www-data:www-data . /var/www WORKDIR /var/www +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + RUN echo '#!/bin/sh\n\ extensions=$(cat composer.json | jq -r ".require | to_entries[] | select(.key | startswith(\"ext-\")) | .key[4:]")\n\ for ext in $extensions; do\n\ @@ -2542,6 +2242,68 @@ done' > /usr/local/bin/install_php_extensions.sh \ && /usr/local/bin/install_php_extensions.sh RUN composer install --optimize-autoloader --no-dev +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx-0+os-roadrunner - 1] +FROM docker.io/library/php:8.2-fpm + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/7-laravel-nginx-0+os-swoole - 1] +FROM docker.io/phpswoole/swoole:php7 +RUN docker-php-ext-install pcntl + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + + CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=8080"] --- + +[TestTemplate/8.2-laravel-nginx-0 - 1] +FROM docker.io/library/php:8.2-fpm + +RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +--- + +[TestTemplate/8.2-laravel-nginx,owo-0+os-roadrunner - 1] +FROM docker.io/library/php:8.2-fpm + +RUN apt-get update && apt-get install -y nginx,owo && rm -rf /var/lib/apt/lists/* + +COPY --chown=www-data:www-data . /var/www +WORKDIR /var/www + +RUN rm /etc/nginx/sites-enabled/default +RUN echo "server {\n listen 8080;\n root /var/www/public;\n\n add_header X-Frame-Options "SAMEORIGIN";\n add_header X-Content-Type-Options "nosniff";\n\n index index.php index.html;\n charset utf-8;\n\n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n\n error_page 404 /index.php;\n\n location ~ \.php\$ {\n try_files \$uri =404;\n fastcgi_split_path_info ^(.+\.php)(/.+)\$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n fastcgi_param PATH_INFO \$fastcgi_path_info;\n fastcgi_buffering off;\n }\n\n location / {\n try_files \$uri \$uri/ /index.php?\$query_string;\n gzip_static on;\n }\n\n location ~ /\.(?!well-known).* {\n deny all;\n }\n}\n" >> /etc/nginx/sites-enabled/default + + +CMD nginx; php-fpm + +---