A Docker image based on Ubuntu, serving PHP 7.4 FPM running as Nginx Module. Useful for Web developers in need for a fixed PHP version. In addition, the error_reporting
setting in php.ini is configurable per container via environment variable.
- Docker v18+ / Docker-compose v1.23+ / Manage Docker as a non-root user
- Make command: Under linux
sudo apt install build-essential
or for windows users - Git
Before use the docker version, check that ports 80/8080/443 are available. If an Apache / Nginx local server, another docker container are active, they can block access to these ports.
make install
# If symfony project is present on project folder
make install composer-install perm
Installed packages:
- nginx
- php
- php-cli
- php-acpu
- php-curl
- php-gd
- php-imagick
- php-intl
- php-mbstring
- php-pdo_pgsql
- php-opcache
- php-zip
- composer (php package manager)
For test Nginx/php container, you can install Symfony Demo
make install-demo
Launch docker containers: make up
, or stop with make stop
, you can get command list with make help
.
You can connect on url application:
If you use dev docker file (default configuration), you have additional tools:
- You can access to postgres on localhost:54320 (for PhpStorm / Postgres Workbench).
- You can use postgres command line without indicate user/pass:
- Standard request:
make db-query CMD="SELECT id, title, published_at FROM symfony_demo_post LIMIT 5"
- or
make db-query CMD="\dt"
(show tables list)
- Dump (data only):
make db-dump
- Dump (data with schema):
make db-dump-full
- Import dump (data only):
make db-import-data
- Import dump (data with schema):
make db-import-full
- Standard request:
Enjoy