Sign inSign up

universityofabdn/docker-php74

By universityofabdn

•Updated over 5 years ago

Image
0

438

universityofabdn/docker-php74 repository overview

This is an Apache+PHP 7.4 Docker image emulating the (future) PHP production environment.

It should be used alongside uofa/docker-php74-workspace.

⁠Usage:

Update your docker-compose.yml with:

web:
 image: universityofabdn/docker-php74
⁠Tips and tricks:

Open a bash terminal into the container:

docker exec -it <application_name>_web_1 bash

Log files:

# apache
tail -f /etc/httpd/log/error_log
# xdebug
tail -f /tmp/xdebug

Using Supervisor (see http://supervisord.org/running.html⁠)

# restart apache
supervisorctl restart httpd
# restart php-fpm
supervisorctl restart php-fpm

Turn off Xdebug

mv /etc/php.d/15-xdebug.ini /etc/php.d/15-xdebug.disabled

Turn Xdebug back on

mv /etc/php.d/15-xdebug.disabled /etc/php.d/15-xdebug.ini

Status

# Check loaded extensions
php --ini
# Check version
php -v
# Check php-fpm is running
php-fpm
# Check Apache Config
httpd -t

Xdebug configuration for VSCode

{
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "log": true,
    "pathMappings": {
        "/var/www": "${workspaceRoot}"
    },
    "port": 9000,
    "xdebugSettings": {
        "max_data": -1
    }
},

The port can be changed by setting the env variable HOST_PORT_XDEBUG on the container.

Tag summary

Content type

Image

Digest

Size

690.2 MB

Last updated

over 5 years ago

docker pull universityofabdn/docker-php74