{"id":20945088,"url":"https://github.com/vjik/docker-dev-php","last_synced_at":"2025-05-14T01:31:29.580Z","repository":{"id":59179035,"uuid":"455584147","full_name":"vjik/docker-dev-php","owner":"vjik","description":"PHP docker image for local development.","archived":false,"fork":false,"pushed_at":"2024-07-23T09:21:55.000Z","size":102,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-23T11:22:26.088Z","etag":null,"topics":["docker","docker-image","php"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vjik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-04T14:48:37.000Z","updated_at":"2024-07-23T09:21:56.000Z","dependencies_parsed_at":"2023-02-17T19:55:17.694Z","dependency_job_id":"6ae06585-3ad7-460c-acab-e171872f5899","html_url":"https://github.com/vjik/docker-dev-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Fdocker-dev-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Fdocker-dev-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Fdocker-dev-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Fdocker-dev-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vjik","download_url":"https://codeload.github.com/vjik/docker-dev-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225269318,"owners_count":17447508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["docker","docker-image","php"],"created_at":"2024-11-18T23:46:39.179Z","updated_at":"2025-05-14T01:31:29.573Z","avatar_url":"https://github.com/vjik.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `vjik/dev-php` Docker Image\n\nPHP docker images for local development. All images contain:\n\n- PHP with extensions:\n  [BCMath](https://www.php.net/manual/book.bc.php),\n  [intl](https://www.php.net/manual/book.intl.php),\n  [Gettext](https://www.php.net/manual/book.gettext.php),\n  [Sockets](https://www.php.net/manual/book.sockets.php),\n  PDO ([MySQL](https://www.php.net/manual/ru/ref.pdo-mysql.php), [PostgreSQL](https://www.php.net/manual/ref.pdo-pgsql.php)),\n  [APCu](https://www.php.net/manual/book.apcu.php),\n  [Memcached](https://www.php.net/manual/book.memcached.php),\n  [Process Control (PCNTL)](https://www.php.net/manual/en/book.pcntl.php)\n- Bash terminal with [predefined aliases](#aliases)\n- [Starship shell prompt](https://starship.rs/)\n- [Composer](https://getcomposer.org/) with [completion](https://getcomposer.org/doc/03-cli.md#bash-completions)\n- [GIT](https://git-scm.com/)\n- [GnuPG](https://www.gnupg.org/) for sign commits\n- OpenSSH authentication agent (`ssh-agent`)\n\n![](screenshot.png)\n\n## General usage\n\n### Pull image from DockerHub\n\n[Image on DockerHub](https://hub.docker.com/r/vjik/dev-php), docker pull command:\n\n```shell\ndocker pull vjik/dev-php:8.3\n```\n\nDevelopment tags:\n\n- [Node.js](https://nodejs.org/)\n- [Xdebug](https://xdebug.org/)\n- [OPcache](https://www.php.net/manual/book.opcache.php) PHP extension\n- [GitHub Lookup Next ID Utility](https://github.com/vjik/github-lookup-next-id)\n- [uopz](https://www.php.net/manual/book.uopz.php) PHP extension\n\n|   Tag    | PHP version | Xdebug | uopz |\n|:--------:|:-----------:|:------:|:----:|\n|   8.4    |     8.4     |   ✔️   |  ❌  |\n|   8.3    |     8.3     |   ✔️   |  ❌  |\n|   8.2    |     8.2     |   ✔️   |  ❌  |\n|   8.1    |     8.1     |   ✔️   |  ❌  |\n|   8.0    |     8.0     |   ✔️   |  ❌  |\n|   7.4    |     7.4     |   ✔️   |  ❌  |\n| 8.1-uopz |     8.1     |   ✔️   |  ✔️  |\n\nBenchmark tags:\n\n- [OPcache](https://www.php.net/manual/book.opcache.php) PHP extension\n\n|        Tag        | PHP version | OPcache |\n|:-----------------:|:-----------:|:-------:|\n|     8.2-bench     |     8.2     |    ❌   |\n| 8.2-bench-opcache |     8.2     |    ✔️   |\n\n### Run container\n\nRecommended run command:\n\n```shell\ndocker run -it --rm --name dev-php -v /host/projects:/projects -w /projects vjik/dev-php:8.3\n```\n\n- `-it` — Interactive mode with allocate a pseudo terminal.\n- `--rm` — Automatically remove the container when it exits.\n- `--name dev-php` — Assign name \"dev-php\" to the container.\n- `-v /host/projects:/projects` — Mount folder with your projects (replace `/host/projects` to your path) to container\n  (`/projects`).\n- `-w /projects` — Set `/projects` as working directory inside the container.\n- `vjik/dev-php:8.3` — Image name.\n\nIf you use WSL in Windows recommended to add the same username and group as in your system:\n\n```shell\ndocker run -it --rm --name dev-php -v /host/projects:/projects -w /projects vjik/dev-php:8.3 --uname `id -un` --uid `id -u` --gname `id -gn` --gid `id -g`\n```\n\n- ``--uname `id -un` `` — Set username in container (`id -un` returns current user name).\n- ``--uid `id -u` `` — Set user ID in container (`id -u` returns current user ID).\n- ``--gname `id -gn` `` — Set user group name in container (`id -gn` returns current user group name).\n- ``--gid `id -g` `` — Set user group ID in container (`id -g` returns current user group ID).\n\n#### SSH configuration\n\nYou can configure SSH in container via mount folder with SSH configuration to path `/config/.ssh`. To do this, add the\nappropriate argument to the container run command. For example:\n\n`-v ~/.ssh:/config/.ssh`\n\n#### GIT configuration\n\nYou can configure GIT in container via mount configuration file `.gitconfig` to path `/config/.gitconfig`. To do this, \nadd the appropriate argument to the container run command. For example:\n\n`-v ~/.gitconfig:/config/.gitconfig`\n\n#### GnuPG configuration\n\nYou can configure GnuPG in container via mount folder with GnuPG configuration to path `/config/.gnupg`. To do this, add the\nappropriate argument to the container run command. For example:\n\n`-v ~/dev-gnupg:/config/.gnupg`\n\nRecommend don't use system `.gnupg` directory. Better create new directory and mount it.\n\nTo request passphrase in terminal add `pinentry-mode loopback` option to `gpg.conf` file (create if not exist).\n\n## Features\n\n### Aliases\n\n| Alias   | Command                                         |\n|---------|-------------------------------------------------|\n| c       | composer                                        |\n| cu      | composer update                                 |\n| pu      | ./vendor/bin/phpunit                            |\n| puc     | ./vendor/bin/phpunit --coverage-html=cover      |\n| puct    | ./vendor/bin/phpunit --coverage-text            |\n| puf     | ./vendor/bin/phpunit --filter                   |\n| psalm   | ./vendor/bin/psalm --no-cache                   |\n| psalm74 | ./vendor/bin/psalm --no-cache --php-version=7.4 |\n| psalm80 | ./vendor/bin/psalm --no-cache --php-version=8.0 |\n| psalm81 | ./vendor/bin/psalm --no-cache --php-version=8.1 |\n| psalm82 | ./vendor/bin/psalm --no-cache --php-version=8.2 |\n| psalm83 | ./vendor/bin/psalm --no-cache --php-version=8.3 |\n| psalm84 | ./vendor/bin/psalm --no-cache --php-version=8.4 |\n| cls     | clear                                           |\n\n## Build an image\n\nUse [Task](https://taskfile.dev/) for simplify run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvjik%2Fdocker-dev-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvjik%2Fdocker-dev-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvjik%2Fdocker-dev-php/lists"}