This image is for all php developers who want a basic development environment setup.
It is out of the box usable on linux hosts with a docker engine version >= 1.3
Includes your app path at a nginx and php-fpm basic setup and provides any special developing features as:
- xdebug
- phpinfo
Concerning building your PHP app there are availabel composer as package manager and phing as build tool.
Download and go to the folder building the images as e.g.
docker build --tag dev-www:latest .
Run the image and include your developing php app folder
docker run --name dev-www -d -v /path/to/my/project:/app -p 127.0.0.1:80:80 dev-www:latest .
A container named dev-www will started mounting your php app at port 80. Call http://127.0.0.1/
at your browser to verify the runtime environment.
By default php is configured up to start a debugging session indicated by request parameters. Therefore, it exists a couple of handy browser-addons (e.g. xdebug-helper for chrome). Please note! The IDE should be configured additionally to accept started debugging sessions by remote.
Look at the PHP-configuration at http://127.0.0.1/phpinfo
There is the possibility to use bash and a few of common used terminal commands for example less
, vi
and so on.
docker exec -ti dev-www /bin/bash
Following environment variables can be set when creating (run) a new container.
The values given here are the default values.
APP_HOME=/app
defines the application folder, normally where your application resides. there are some rare cases where strange software needs to be configured to reside in a special placeAPP_USER=dev
defines the user running the appTIME_ZONE=Europe/Berlin
defines the timezone php is working inSMTP_HOST
defines the smtp host that takes mails sent by php. if none is provided the php default values take placeSMTP_NAME=www-dev
defines the host name as which the container sents his emailsSMTP_PORT=25
defines the port on which the container trys to connect to the smtp host
Releases are orientated on PHP version of based Alpine PHP-FPM image as for example php:7.4-fpm-alpine.
At https://git.sc.uni-leipzig.de exists a Gitlab CI-pipeline building an image and publishing it to a registry.
A release tag is necessary to publish an image to ubleipzig/dev-www Release tags have to be the schema of release/* and to start with prefixed terminus release.
For example if you would push a new tag named release/7.4-0 following set of new images will be created:
- 7.4-0
- 7.4
- 7
- latest