From 2d18152b9b9635c8e3a90ca8fa1f91f441e00342 Mon Sep 17 00:00:00 2001 From: noone-silent Date: Thu, 17 Apr 2025 10:37:50 +0700 Subject: [PATCH 1/4] [5.9.x] - feature(docker): added basic docker documentation. --- docs/docker-introduction.md | 122 ++++++++++++++++++++++++++++++++++++ mkdocs.yml | 47 +++++++------- 2 files changed, 146 insertions(+), 23 deletions(-) create mode 100644 docs/docker-introduction.md diff --git a/docs/docker-introduction.md b/docs/docker-introduction.md new file mode 100644 index 000000000..559e5b6fd --- /dev/null +++ b/docs/docker-introduction.md @@ -0,0 +1,122 @@ +# Docker + +## Introduction + +Since Version 5.9.2, we provide production-ready docker images for your convenience. +By default, the Docker images run as user `phalcon` in group `phalcon` and `UID` and `GID` 1000. + +You can override those values by providing a different user and group in your docker compose or stack file. +You also can use our [Dockerfile](https://github.com/phalcon/cphalcon/blob/master/docker/Dockerfile) to permanently +change those values. + +## How to download? + +We provide our Docker images on the Docker Hub and GitHub. See the following table for the addresses: + +| Provider | Pull command example | +|------------|------------------------------------------------------| +| Docker Hub | `docker pull phalconphp/cphalcon:v5.9.2-php8.4` | +| GitHub | `docker pull ghcr.io/phalcon/cphalcon:v5.9.2-php8.4` | + +!!! info "NOTE" + + We do not provide a "latest" tag on our Docker images. + +The tag for our Docker images has the following build: `v[Phalcon Release]-php[PHP Version]` +As example: If you want to install Phalcon Version 5.8.0 on PHP 8.2, the tag would be: `v5.8.0-php8.2` + +## How do we build the docker images? + +As the base we use the official PHP FPM docker image based on Debian Linux. +We integrate a basic healthcheck and all configurations needed to run a basic Phalcon application. + +Take a look at our [Dockerfile](https://github.com/phalcon/cphalcon/blob/master/docker/Dockerfile) for more details. + +## Extensions + +The following list of extensions is included in every release: + +- apcu +- ctype +- curl +- date +- dom +- fileinfo +- filter +- gd +- gettext +- hash +- iconv +- igbinary +- imagick +- intl +- json +- libxml +- mbstring +- mysqli +- mysqlnd +- opcache +- openssl +- pcre +- PDO +- pdo_mysql +- pdo_pgsql +- pdo_sqlite +- pgsql +- phalcon +- Phar +- posix +- random +- readline +- redis +- Reflection +- session +- SimpleXML +- sodium +- SPL +- sqlite3 +- standard +- tokenizer +- xml +- xmlreader +- xmlwriter +- xsl +- yaml +- zip +- zlib + +## Extending the Docker image + +The provided Docker image is usually all you need to run a basic Phalcon application. +For more advanced applications, you maybe need to install another extension. + +Let's say you want to install the `memcached` extension. Phalcon provides an easy way to do so: + +```dockerfile +FROM phalconphp/cphalcon:v5.9.2-php8.4 + +RUN set -eux \ + && install-php-extensions memcached +``` + +For a full list of supported extensions using this method, please see the [Documentation](https://github.com/mlocati/docker-php-extension-installer#supported-php-extensions). +For other extensions not covered by this method, please see the official PHP Docker image [Documentation](https://hub.docker.com/_/php/). + +## Notes + +We provide production-ready images. That means we do not install anything else you might need in a local development +environment. For example, we do not have installed `curl` or `composer`. This minimizes the possibility to download +malicious content inside your docker image. We also do not install `xdebug` or tools like `top` or `git`. + +## Credits + +We want to thank the following people for providing us with tools for building production-ready docker images: + +[PHP](https://github.com/php/) +: The PHP Team for providing us the base image including the newest PHP Versions. + +[mlocati](https://github.com/mlocati/docker-php-extension-installer) +: For providing an even better PHP extension installer and a lot of supported extensions. + +[renatomefi](https://github.com/renatomefi/php-fpm-healthcheck) +: For the FPM healthcheck script. diff --git a/mkdocs.yml b/mkdocs.yml index b6419414c..94a206d4e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,3 @@ - # Project information site_name: Phalcon Documentation site_url: https://docs.phalcon.io @@ -294,31 +293,31 @@ nav: - Home: - Introduction: introduction.md - Changelog: - - Current Version: https://github.com/phalcon/cphalcon/blob/5.0.x/CHANGELOG-5.0.md - - Releases: releases.md - - How to upgrade: upgrade.md + - Current Version: https://github.com/phalcon/cphalcon/blob/5.0.x/CHANGELOG-5.0.md + - Releases: releases.md + - How to upgrade: upgrade.md - Contributing: - - Contributions: contributions.md - - Asking a question: https://phalcon.io/discussions - - Requesting a change: new-feature-request.md - - Issuing a Pull Request: new-pull-request.md + - Contributions: contributions.md + - Asking a question: https://phalcon.io/discussions + - Requesting a change: new-feature-request.md + - Issuing a Pull Request: new-pull-request.md - Guides: - - Backtrace Generation: generating-backtrace.md - - Reproducible Tests: reproducible-tests.md - - Testing environment: testing-environment.md - - Coding Standard: coding-standard.md + - Backtrace Generation: generating-backtrace.md + - Reproducible Tests: reproducible-tests.md + - Testing environment: testing-environment.md + - Coding Standard: coding-standard.md - Sponsoring: sponsors.md - Getting Started: - Installation: installation.md - Webserver Setup: webserver-setup.md - Environments: - - Devilbox: environments-devilbox.md - - Nanobox: environments-nanobox.md + - Devilbox: environments-devilbox.md + - Nanobox: environments-nanobox.md - Development Tools: - - Devtools: devtools.md - - Debug: support-debug.md - - Migrations: db-migrations.md - - Unit Testing: unit-testing.md + - Devtools: devtools.md + - Debug: support-debug.md + - Migrations: db-migrations.md + - Unit Testing: unit-testing.md - Tutorials: - Basic: tutorial-basic.md - Invo: tutorial-invo.md @@ -354,11 +353,11 @@ nav: - Forms: forms.md - Image: image.md - HTML: - - Attributes: html-attributes.md - - Breadcrumbs: html-breadcrumbs.md - - Escaper: html-escaper.md - - Link: html-link.md - - Tag Factory: html-tagfactory.md + - Attributes: html-attributes.md + - Breadcrumbs: html-breadcrumbs.md + - Escaper: html-escaper.md + - Link: html-link.md + - Tag Factory: html-tagfactory.md - Tag (legacy): tag.md - View: views.md - Volt: volt.md @@ -398,6 +397,8 @@ nav: - Helper: support-helper.md - Registry: support-registry.md - Version: support-version.md + - Docker: + Introduction: docker-introduction.md - API: api/index.md - Discussions: https://github.com/orgs/phalcon/discussions - Discussions(v6): https://github.com/phalcon/phalcon/discussions From 2252ee30f288c8e87c7157673af9e24e83808984 Mon Sep 17 00:00:00 2001 From: noone-silent Date: Thu, 17 Apr 2025 10:39:52 +0700 Subject: [PATCH 2/4] [5.9.x] - feature(docker): added basic docker documentation. --- mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 94a206d4e..03a5198db 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -310,6 +310,8 @@ nav: - Getting Started: - Installation: installation.md - Webserver Setup: webserver-setup.md + - Docker: + Introduction: docker-introduction.md - Environments: - Devilbox: environments-devilbox.md - Nanobox: environments-nanobox.md @@ -397,8 +399,6 @@ nav: - Helper: support-helper.md - Registry: support-registry.md - Version: support-version.md - - Docker: - Introduction: docker-introduction.md - API: api/index.md - Discussions: https://github.com/orgs/phalcon/discussions - Discussions(v6): https://github.com/phalcon/phalcon/discussions From 00ca4b4629a038052b1d3c2589e93acb21bfb6e7 Mon Sep 17 00:00:00 2001 From: noone-silent Date: Thu, 17 Apr 2025 10:47:42 +0700 Subject: [PATCH 3/4] [5.9.x] - feature(docker): added basic docker documentation. --- docs/docker-introduction.md | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/docs/docker-introduction.md b/docs/docker-introduction.md index 559e5b6fd..354b9efe7 100644 --- a/docs/docker-introduction.md +++ b/docs/docker-introduction.md @@ -34,56 +34,25 @@ Take a look at our [Dockerfile](https://github.com/phalcon/cphalcon/blob/master/ ## Extensions -The following list of extensions is included in every release: +The following list of extensions is installed additional to the extensions of the PHP Docker image in every release: - apcu -- ctype -- curl -- date -- dom -- fileinfo -- filter - gd - gettext -- hash -- iconv - igbinary - imagick - intl -- json -- libxml -- mbstring - mysqli - mysqlnd - opcache -- openssl -- pcre -- PDO - pdo_mysql - pdo_pgsql -- pdo_sqlite - pgsql - phalcon -- Phar -- posix -- random -- readline - redis -- Reflection -- session -- SimpleXML -- sodium -- SPL -- sqlite3 -- standard -- tokenizer -- xml -- xmlreader -- xmlwriter - xsl - yaml - zip -- zlib ## Extending the Docker image From a45941dce762de848081854b2cd1123ad36dc5d4 Mon Sep 17 00:00:00 2001 From: noone-silent Date: Mon, 21 Apr 2025 08:12:02 +0700 Subject: [PATCH 4/4] [5.9.x] - feature(docker): added basic docker documentation. --- docs/{docker-introduction.md => environments-docker.md} | 0 mkdocs.yml | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) rename docs/{docker-introduction.md => environments-docker.md} (100%) diff --git a/docs/docker-introduction.md b/docs/environments-docker.md similarity index 100% rename from docs/docker-introduction.md rename to docs/environments-docker.md diff --git a/mkdocs.yml b/mkdocs.yml index 03a5198db..c3a57db01 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -310,11 +310,10 @@ nav: - Getting Started: - Installation: installation.md - Webserver Setup: webserver-setup.md - - Docker: - Introduction: docker-introduction.md - Environments: - Devilbox: environments-devilbox.md - Nanobox: environments-nanobox.md + - Docker: environments-docker.md - Development Tools: - Devtools: devtools.md - Debug: support-debug.md