{"id":37771838,"url":"https://github.com/antonmarin/php","last_synced_at":"2026-01-16T14:53:22.555Z","repository":{"id":36337538,"uuid":"223579984","full_name":"antonmarin/php","owner":"antonmarin","description":"Simple base php image","archived":false,"fork":false,"pushed_at":"2022-06-03T04:25:13.000Z","size":86,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-02T20:26:43.964Z","etag":null,"topics":["composer","docker-image","php","php5","php7","xdebug"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonmarin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-23T11:47:16.000Z","updated_at":"2021-12-23T07:13:06.000Z","dependencies_parsed_at":"2022-08-20T14:50:54.550Z","dependency_job_id":null,"html_url":"https://github.com/antonmarin/php","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/antonmarin/php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmarin%2Fphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmarin%2Fphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmarin%2Fphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmarin%2Fphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonmarin","download_url":"https://codeload.github.com/antonmarin/php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmarin%2Fphp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","docker-image","php","php5","php7","xdebug"],"created_at":"2026-01-16T14:53:21.797Z","updated_at":"2026-01-16T14:53:22.542Z","avatar_url":"https://github.com/antonmarin.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP image\n\n[![dockeri.co](https://dockeri.co/image/antonmarin/php)](https://hub.docker.com/r/antonmarin/php/)\n\nBasic php image with composer installed and xdebug installed but disabled.\n\n## Goal and content motivation\n\nlibrary/php is great, but not enough. Almost every php project uses composer, as it\nbecame standard to create php packages. And we often use xdebug while develop.\nSo it includes the latest composer and latest xdebug available at moment of build.\n\n## Usage\n\n### PHP\n\nUse environment variable to alter php.ini settings:\n\n- TZ=date.timezone\n- PHP_INI_MEMORY_LIMIT\n- PHP_INI_ERROR_REPORTING int from [Integer value calculator](https://maximivanov.github.io/php-error-reporting-calculator/)\n- PHP_INI_DISPLAY_ERRORS 1/0\n- PHP_INI_SESSION_USE_COOKIES 1/0\n\n### Composer\n\nComposer is built-in. Just use it as usual `composer ...` inside container.\n\nVariables to set up Composer:\n\n- COMPOSER_MEMORY_LIMIT\n\n### Extensions\n\n#### PDO\n\nMySQL and PostgreSQL extensions installed and disabled.\n\nTo enable in cli `php -dextension=pdo_mysql.so` or `php -dextension=pdo_pgsql.so`.\nTo enable in fpm use `php-fpm -dextension=pdo_mysql.so` or `php-fpm -dextension=pdo_pgsql.so` to start container.\n\n#### Xdebug\n\nXdebug is installed, but disabled. [Beginning from 7.3](https://xdebug.org/docs/compat) Xdebug3 is bundled.\n\nTo enable xdebug in cli just `php -dzend_extension=xdebug.so` or setup your IDE interpreter.\nTo enable xdebug in fpm use `php-fpm -d zend_extension=xdebug.so` command to start container.\nProfiling and tracing files are stored at `/tmp`\n\nVariables to setup Xdebug:\n\n- [XDEBUG_CONFIG](https://xdebug.org/docs/all_settings#XDEBUG_CONFIG)\n- PHP_INI_XDEBUG_REMOTE_HOST. Sets xdebug.remote_host for Xdebug2 or xdebug.client_host for Xdebug3\n- For Jetbrains IDE: [PHP_IDE_CONFIG](https://blog.jetbrains.com/phpstorm/2012/03/new-in-4-0-easier-debugging-of-remote-php-command-line-scripts/)\n\n##### Xdebug 3\n\nTo enable profiling add `-d xdebug.mode=profile` or `-d xdebug.mode=trace` to enable tracing.\n\n##### Xdebug 2\n\nTo enable profiling add `-d xdebug.profiler_enable=On` and `-d xdebug.auto_trace=1` to enable tracing.\n\nNotice that php built in server doesn't populate $_ENV to $_SERVER, so it doesn't\nsupport [PHP_IDE_CONFIG](https://blog.jetbrains.com/phpstorm/2012/03/new-in-4-0-easier-debugging-of-remote-php-command-line-scripts/)\nenv variable to set up server mapping\n\n### Examples\n\n#### Manual run php cli\n\n    docker run --rm \\\n        -e PHP_INI_SESSION_USE_COOKIES=0 \\\n        -e PHP_INI_XDEBUG_REMOTE_HOST=host.docker.internal \\\n        antonmarin/php:7.4-alpine-cli \\\n        php -dzend_extension=xdebug.so -i\n\n#### Use composer\n\n    docker run --rm antonmarin/php:7.4-alpine-cli composer show --platform\n\n#### docker-compose\n\n    services:\n      php:\n        image: antonmarin/php:7.4-alpine-fpm\n        environment:\n          PHP_INI_SESSION_USE_COOKIES: 0\n          PHP_INI_XDEBUG_REMOTE_HOST: {{YOUR_IP_ADDRESS}}\n          PHP_IDE_CONFIG: serverName={{YOUR_APPLICATION_NAME}}\n        command:\n          - php-fpm\n          - -d\n          - zend_extension=xdebug.so\n\n#### PhpStorm interpreter\n\n[PHPStorm](https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html#on_demand_mode)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonmarin%2Fphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonmarin%2Fphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonmarin%2Fphp/lists"}