Dockerfile is originally build from webdevops/php:7.4 with partial nginx configuration from webdevops/php-nginx:7.4.
Dockerfile includes:
- Phalcon extension preinstalled and does not need separate installation (solves phalcon installation freeze issue using Docker Toolbox)
- Latest nginx version installed,
/index.php
routed to/app/public/index.php
- Composer installed
- Xdebug installed
- mcedit installed and configured to edit files via
edit
command usingmodarin256
skin (better compatibility using PHP Storm dark mode)
Latest release software versions:
Software | Version (docker image) | Version (manual build) |
---|---|---|
PHP | 7.4.12 | 7.4.* (latest stable) |
Phalcon | 4.1.0 | 4.1.0 |
Nginx | 1.19.5 | latest stable |
Xdebug | 3.0.1 | latest stable |
Composer | 2.0.6 | latest stable |
Use one of docker images:
phpnotdead/phalcon:7.4-4.1.0
from docker.io (usually, faster pull time)docker.pkg.github.com/php-not-dead/phalcon-dockerfile/php7.4:4.1.0
from github.com
image: phpnotdead/phalcon:7.4-4.1.0
Full docker-compose.yml
file example with 7.4-4.1.0
release tag:
version: '3.7'
services:
phalcon:
container_name: phalcon
image: phpnotdead/phalcon:7.4-4.1.0
ports:
- 801:80
volumes:
- ./src:/app
docker pull phpnotdead/phalcon:7.4-4.1.0
docker run -d -v src:/app -p 801:80 --name phalcon phpnotdead/phalcon:7.4-4.1.0
Using exact release tag (recommended):
context: https://github.com/php-not-dead/phalcon-dockerfile.git#release_tag
Using master
branch:
context: https://github.com/php-not-dead/phalcon-dockerfile.git
Full docker-compose.yml
file example with 7.4-4.1.0
release tag:
version: '3.7'
services:
phalcon:
container_name: phalcon
build:
context: https://github.com/php-not-dead/phalcon-dockerfile.git#7.4-4.1.0
image: phalcon
ports:
- 801:80
volumes:
- ./src:/app
Specify a path to Dockerfile
in context
:
context: '.'
Run directly from git repository:
docker build https://github.com/php-not-dead/phalcon-dockerfile.git#7.4-4.1.0 -t phalcon
docker run -d -p 801:80 -v src:/app --name phalcon phalcon
-- OR --
git clone
or download repository and run:
git clone https://github.com/php-not-dead/phalcon-dockerfile.git
docker build -t phalcon phalcon-dockerfile
docker run -d -v src:/app -p 801:80 --name phalcon phalcon