This image goes to all the php developers that want a developmnent testing environment set up in no time.
It is out of the box usable on linux hosts with a docker version >= 1.3
The image prepares apache2, php and mysql and wraps around your local codebase.
the following tools next to apache2, php 5.x (depending on the label) and mysql are at your service:
- xdebug
- webgrind
- phpinfo
now you can use the docker to use this folder as vufind base and wrap the runtime environment around
docker run --name dev-dotdeb -d -v /path/to/my/project:/app -p 127.0.0.1:80:80 useltmann/dev-dotdeb
this starts the container named dev-dotdeb and sets up all the components with its default values. you should now be able to reach the your project folder at
By default php is configured up to start a debugging session indicated by request parameters. this comes in handy to use with several browser-addons (e.g. xdebug-helper for chrome). Therefore the IDE should be configured to accept remotely started debugging sessions.
Also xdebug is able to profile script runs. The trace protocols can be used to determine potential performance issues. A tool that analyses that protocols is webgrind which is integrated in the docker image and reachable here
look at the PHP-configuration at http://127.0.0.1/phpinfo
look at the XCache statistics at http://127.0.0.1/xcache
This utilises the docker-image useltmann/mailcollect which acts as smtp-server and catches all sent emails in one inbox, regardless where its sent.
to use it in conjunction with this docker-image you should start a container first. after its up and running you have to link this container to the dev-dotdeb container by adding the --link option to the run-command above
docker run --name dev-dotdeb -d -v /path/to/my/project:/app -p 127.0.0.1:80:80 --link=mailcollect:smtp -e SMTP_HOST=smtp docker.io/useltmann/dev-dotdeb
The dev-dotdeb container is now connected to the mailcollect container and all mail that is sent by it ends in the mailcollects inbox. see useltmann/mailcollect for further details.
docker exec -ti dev-dotdeb /bin/bash
the 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 php is running withFCGID_MAX_REQUEST_LEN=16384000
defines the maximum request length that the webserver (apache2) is passing to the fcgi daemon (php)TIME_ZONE=Europe/Berlin
defines the timezone php is working inSHIB_HOSTNAME=https://localhost
defines the hostname, port and scheme that is used to create the metadata for SP-registration (schema and port are taken from the request, not from this configuration!)SHIB_HANDLER_URL=/Shibboleth.sso
defines the shibboleth handler locationSHIB_SP_ENTITY_ID=https://hub.docker.com/r/useltmann/dev-dotdeb
defines the sp's entity id. be aware that you have to specify a different entityId in order to enable shibboleth support. if you leave the default entityId, shibboleth will not startSHIB_IDP_DISCOVERY_URL=https://wayf.aai.dfn.de/DFN-AAI-Test/wayf
defines the discovery url. you can also define a distinct IDP by providing the variableSHIB_IDP_ENTITY_ID
insteadSHIB_STATUS_ACL
defines the ip from where shibboleth status requests are allowed. normally this is your public ipSHIB_ATTRIBUTE_MAP
defines simple attribute mappings in stylename=id
and seperate multiple definitions with comma, i.e. if you want to define a new Attribute with name "urn:oid:1.3.6.1.4.1.5923.1.1.1.9" and id "affiliation" you should do as follows' `SHIB_ATTRIBUTE_MAP="urn:oid:1.3.6.1.4.1.5923.1.1.1.9=affiliation"SQL_MODE
defines the sql_mode that mysqld is running with. I.e.SQL_MODE="STRICT_TRANS_TABLES"
SMTP_HOST
defines the smtp host that takes mails sent by php. if none is provided the php default values take placeSMTP_NAME=dev-dotdeb
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
for now only DFN-Test-IDP Metadata is supported.
- outsource database utilisation