Skip to content

MilesChou/docker-phalcon

Repository files navigation

Docker Phalcon

Phalcon Version Phalcon devtools ci

Docker Phalcon base image, see DockerHub.

The repository is a Docker image based on Docker official PHP image with Phalcon Framework.

The Phalcon Action is Use GitHub Actions with this image.

Variants for Phalcon

It's only support PHP 7.4 since Phalcon 5.0.0 release. We will keep the old Docker image, but we will not to update old image.

The dockerfile with old Phalcon versions can be found at branchs:

Image Test

Here is a simple test command that can confirm the extension has been loaded & check version.

$ docker run -it --rm mileschou/phalcon:alpine sh -c "php --ri phalcon | grep -i ^version" 
Version => 4.0.0

Running a php script

$ docker run -v ${PWD}:/usr/src/app -w /usr/src/app mileschou/phalcon:7.4-cli php script.php

Install phalcon/devtools

docker-phalcon-install-devtools is a script to install latest release of Phalcon Devtools CLI.

Here is usage example:

$ docker run -it --rm mileschou/phalcon docker-phalcon-install-devtools
>>> Downloading phalcon.phar ...
>>> Testing 'phalcon --version' command ...

Phalcon DevTools (4.0.0)

Environment:
  OS: Linux 4e17aa4d915d 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64
  PHP Version: 7.4.1
  PHP SAPI: cli
  PHP Bin: /usr/local/bin/php
  PHP Extension Dir: /usr/local/lib/php/extensions/no-debug-non-zts-20190902
  PHP Bin Dir: /usr/local/bin
  Loaded PHP config: 
Versions:
  Phalcon DevTools Version: 4.0.0
  Phalcon Version: 4.0.0
  AdminLTE Version: 2.3.6

Build yourself

Recommend 2G+ RAM when build image yourself. Maybe wait a long time for compile if only 1G RAM.

Memo

List the variants of Docker official PHP:

make variants

Thanks

Contributors