Skip to content

Commit d0773c7

Browse files
authored
Merge pull request #259 from noone-silent/5.9.x-docker-documentation
5.9.x docker documentation
2 parents 450707c + a45941d commit d0773c7

File tree

2 files changed

+114
-23
lines changed

2 files changed

+114
-23
lines changed

docs/environments-docker.md

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Docker
2+
3+
## Introduction
4+
5+
Since Version 5.9.2, we provide production-ready docker images for your convenience.
6+
By default, the Docker images run as user `phalcon` in group `phalcon` and `UID` and `GID` 1000.
7+
8+
You can override those values by providing a different user and group in your docker compose or stack file.
9+
You also can use our [Dockerfile](https://github.com/phalcon/cphalcon/blob/master/docker/Dockerfile) to permanently
10+
change those values.
11+
12+
## How to download?
13+
14+
We provide our Docker images on the Docker Hub and GitHub. See the following table for the addresses:
15+
16+
| Provider | Pull command example |
17+
|------------|------------------------------------------------------|
18+
| Docker Hub | `docker pull phalconphp/cphalcon:v5.9.2-php8.4` |
19+
| GitHub | `docker pull ghcr.io/phalcon/cphalcon:v5.9.2-php8.4` |
20+
21+
!!! info "NOTE"
22+
23+
We do not provide a "latest" tag on our Docker images.
24+
25+
The tag for our Docker images has the following build: `v[Phalcon Release]-php[PHP Version]`
26+
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`
27+
28+
## How do we build the docker images?
29+
30+
As the base we use the official PHP FPM docker image based on Debian Linux.
31+
We integrate a basic healthcheck and all configurations needed to run a basic Phalcon application.
32+
33+
Take a look at our [Dockerfile](https://github.com/phalcon/cphalcon/blob/master/docker/Dockerfile) for more details.
34+
35+
## Extensions
36+
37+
The following list of extensions is installed additional to the extensions of the PHP Docker image in every release:
38+
39+
- apcu
40+
- gd
41+
- gettext
42+
- igbinary
43+
- imagick
44+
- intl
45+
- mysqli
46+
- mysqlnd
47+
- opcache
48+
- pdo_mysql
49+
- pdo_pgsql
50+
- pgsql
51+
- phalcon
52+
- redis
53+
- xsl
54+
- yaml
55+
- zip
56+
57+
## Extending the Docker image
58+
59+
The provided Docker image is usually all you need to run a basic Phalcon application.
60+
For more advanced applications, you maybe need to install another extension.
61+
62+
Let's say you want to install the `memcached` extension. Phalcon provides an easy way to do so:
63+
64+
```dockerfile
65+
FROM phalconphp/cphalcon:v5.9.2-php8.4
66+
67+
RUN set -eux \
68+
&& install-php-extensions memcached
69+
```
70+
71+
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).
72+
For other extensions not covered by this method, please see the official PHP Docker image [Documentation](https://hub.docker.com/_/php/).
73+
74+
## Notes
75+
76+
We provide production-ready images. That means we do not install anything else you might need in a local development
77+
environment. For example, we do not have installed `curl` or `composer`. This minimizes the possibility to download
78+
malicious content inside your docker image. We also do not install `xdebug` or tools like `top` or `git`.
79+
80+
## Credits
81+
82+
We want to thank the following people for providing us with tools for building production-ready docker images:
83+
84+
[PHP](https://github.com/php/)
85+
: The PHP Team for providing us the base image including the newest PHP Versions.
86+
87+
[mlocati](https://github.com/mlocati/docker-php-extension-installer)
88+
: For providing an even better PHP extension installer and a lot of supported extensions.
89+
90+
[renatomefi](https://github.com/renatomefi/php-fpm-healthcheck)
91+
: For the FPM healthcheck script.

mkdocs.yml

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Project information
32
site_name: Phalcon Documentation
43
site_url: https://docs.phalcon.io
@@ -294,31 +293,32 @@ nav:
294293
- Home:
295294
- Introduction: introduction.md
296295
- Changelog:
297-
- Current Version: https://github.com/phalcon/cphalcon/blob/5.0.x/CHANGELOG-5.0.md
298-
- Releases: releases.md
299-
- How to upgrade: upgrade.md
296+
- Current Version: https://github.com/phalcon/cphalcon/blob/5.0.x/CHANGELOG-5.0.md
297+
- Releases: releases.md
298+
- How to upgrade: upgrade.md
300299
- Contributing:
301-
- Contributions: contributions.md
302-
- Asking a question: https://phalcon.io/discussions
303-
- Requesting a change: new-feature-request.md
304-
- Issuing a Pull Request: new-pull-request.md
300+
- Contributions: contributions.md
301+
- Asking a question: https://phalcon.io/discussions
302+
- Requesting a change: new-feature-request.md
303+
- Issuing a Pull Request: new-pull-request.md
305304
- Guides:
306-
- Backtrace Generation: generating-backtrace.md
307-
- Reproducible Tests: reproducible-tests.md
308-
- Testing environment: testing-environment.md
309-
- Coding Standard: coding-standard.md
305+
- Backtrace Generation: generating-backtrace.md
306+
- Reproducible Tests: reproducible-tests.md
307+
- Testing environment: testing-environment.md
308+
- Coding Standard: coding-standard.md
310309
- Sponsoring: sponsors.md
311310
- Getting Started:
312311
- Installation: installation.md
313312
- Webserver Setup: webserver-setup.md
314313
- Environments:
315-
- Devilbox: environments-devilbox.md
316-
- Nanobox: environments-nanobox.md
314+
- Devilbox: environments-devilbox.md
315+
- Nanobox: environments-nanobox.md
316+
- Docker: environments-docker.md
317317
- Development Tools:
318-
- Devtools: devtools.md
319-
- Debug: support-debug.md
320-
- Migrations: db-migrations.md
321-
- Unit Testing: unit-testing.md
318+
- Devtools: devtools.md
319+
- Debug: support-debug.md
320+
- Migrations: db-migrations.md
321+
- Unit Testing: unit-testing.md
322322
- Tutorials:
323323
- Basic: tutorial-basic.md
324324
- Invo: tutorial-invo.md
@@ -354,11 +354,11 @@ nav:
354354
- Forms: forms.md
355355
- Image: image.md
356356
- HTML:
357-
- Attributes: html-attributes.md
358-
- Breadcrumbs: html-breadcrumbs.md
359-
- Escaper: html-escaper.md
360-
- Link: html-link.md
361-
- Tag Factory: html-tagfactory.md
357+
- Attributes: html-attributes.md
358+
- Breadcrumbs: html-breadcrumbs.md
359+
- Escaper: html-escaper.md
360+
- Link: html-link.md
361+
- Tag Factory: html-tagfactory.md
362362
- Tag (legacy): tag.md
363363
- View: views.md
364364
- Volt: volt.md

0 commit comments

Comments
 (0)