Closed FaimMedia closed 1 year ago
I have the same warnings, but if you wait a while then everything is fine.
Everything works for me and my colleagues. https://github.com/yesworld/starter-phalcon5-php8-docker
Just keep in mind that compile from docker might be resource hungry, took me a while to figure out that I was running out of memory, after allocating 4GB was able to complete the build.
As @Nazariy said Phalcon will require at least 2Gb of RAM during compilation process. In case you are building docker image inside small virtual machine - add swap file with 2Gb.
@FaimMedia, I just finished to compile Phalcon inside aline, I suggest you to install it via pecl instead of git, as it way to straight forward, requires less steps and at the end docker image weights less.
Here are my commands:
docker run -it --rm php:8.2-fpm-alpine sh
apk update && apk add ${PHPIZE_DEPS}
pecl install phalcon
docker-php-ext-enable phalcon
Check if extension was enabled:
php --ri phalcon
with next output:
/var/www/html # php --ri phalcon
phalcon
Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance.
phalcon => enabled
Author => Phalcon Team and contributors
Version => 5.2.1
Build Date => Jun 3 2023 14:33:36
Powered by Zephir => Version 0.17.0-$Id$
If you want to speed up compilation, set env variable with number of CPU cores of your compilation machine (before pecl install
command):
export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
Hi,
Since a few weeks my Docker builds on Alpine doesn't seem to work anymore. This is my (partial) Dockerfile:
I've also tried the official approach via PECL (as described on the website), but this giving me the same results:
This gives me a lot (500+) of compile errors which will eventually quit:
Also tried using Phalcon 5.1, PHP 8.0 and 8.1, Alpine 3.16, all with the same result. Tried the
-DALPINE_LINUX=1
CFLAG, but seems to have no effect.What is the issue here? Seems to be related to #16213.
When using the Zephir to compile, the build takes forever:
Could someone please provide me with a solution here :-)
Greetings, Tim