{"id":22556424,"url":"https://github.com/bukharovsi/docker_plugin","last_synced_at":"2026-04-20T05:33:04.455Z","repository":{"id":62498111,"uuid":"67645329","full_name":"Bukharovsi/docker_plugin","owner":"Bukharovsi","description":"PHP Docker plugin is a plugin for composer that helps build and push docker images","archived":false,"fork":false,"pushed_at":"2017-05-11T15:12:50.000Z","size":198,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T11:32:08.230Z","etag":null,"topics":["build-automation","build-tool","continuous-integration","docker","docker-image","dockerfile","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bukharovsi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-07T21:35:10.000Z","updated_at":"2017-02-17T12:15:44.000Z","dependencies_parsed_at":"2022-11-02T11:46:49.061Z","dependency_job_id":null,"html_url":"https://github.com/Bukharovsi/docker_plugin","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bukharovsi%2Fdocker_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bukharovsi%2Fdocker_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bukharovsi%2Fdocker_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bukharovsi%2Fdocker_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bukharovsi","download_url":"https://codeload.github.com/Bukharovsi/docker_plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246017726,"owners_count":20710240,"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":["build-automation","build-tool","continuous-integration","docker","docker-image","dockerfile","php"],"created_at":"2024-12-07T19:12:35.593Z","updated_at":"2026-04-20T05:33:04.363Z","avatar_url":"https://github.com/Bukharovsi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP Docker plugin\n=================\n[![Build Status](https://travis-ci.org/Bukharovsi/docker_plugin.svg?branch=master)](https://travis-ci.org/Bukharovsi/docker_plugin)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9dc4bc91426744b3b812cba54dc825d7)](https://www.codacy.com/app/bukharovSI/docker_plugin?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Bukharovsi/docker_plugin\u0026amp;utm_campaign=Badge_Grade)\n[![Dependency Status](https://www.versioneye.com/user/projects/58a763664ca76f0047de1714/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58a763664ca76f0047de1714)\n\nPHP Docker plugin is a plugin for composer that helps build and push docker images. \nIt is very useful for continuous integration.\nThis plugin allow you to define image name, compute tags and generate reports.\n\nWhen you use this plugin you still need `Dockerfile`. The plugin only simplified automation build!\n\nBasic usage\n-----------\nIf you already have `Dockerfile` and can build image manually just install plugin and build image immediately \nand push it to docker registry\n```\nphp composer.phar require bukharovsi/docker_plugin\nphp composer.phar docker:build\nphp composer.phar docker:push\n```\nYou will get docker image with tag: \u003cyour_project_name\u003e:\u003cyour_project_version\u003e\n\nAdvanced usage\n--------------\n### How to change project defaults? \nDefaults can be changed in `composer.json` and with console arguments\n\n#### Change project defaults in `composer.json`\ndefine in `composer.json` `extra` section:\n```\n\"extra\": {\n    \"docker\": {\n          \"name\": \"wine_the_pooh.com/honey\",\n          \"version\": \"1.0\",\n          \"dockerfile\": \"Dockerfile\",\n          \"workingdirectory\": \".\"\n    }\n}\n```\nall definitions are optional\n\n#### Change project defaults with console arguments\nall arguments are optional\n```\nphp composer.phar docker:build --name wine_the_pooh.com --tag latest --dockerfile Dockerfile --workingdirectory /var/www/wine_the_pooh\n```\n\n#### Getting image version from git\nIf you are using Git for version control or git flow you can generate image tag based on current Git branch or Git tag.\nFor using this feature specify `\"version\":\"@vcs\"` in `composer.json` or add `--tag @vcs` to `composer docker:build` \nand `composer docker:push` command \nHow does Git tag transforms to Docker tag?\n\n| Git branch                | Docker tag                                                                                    |\n|---------------------------|-----------------------------------------------------------------------------------------------|\n| master                    | latest, (*if commit has a git tag then it add docker tag that will be equals current git tag) |\n| dev, develop, development | dev                                                                                           |\n| any_other_branch          | any_other_branch, Commit SHA                                                                |\n\n### Integration with Teamcity\nDocker plugin can notify Teamcity about built image versions. This plugin use teamcity environment variables \n - `env.BuildTag`\n - `env.BuildTag.1`\n - `env.BuildTag.2`\n - ...\n - `env.BuildTag.n`\n \n after running `composer docker:build` you can use `%env.BuildTag%` and other variables in your scripts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukharovsi%2Fdocker_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbukharovsi%2Fdocker_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukharovsi%2Fdocker_plugin/lists"}