PHPackages                             bukharovsi/docker\_plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. bukharovsi/docker\_plugin

ActiveComposer-plugin[DevOps &amp; Deployment](/categories/devops)

bukharovsi/docker\_plugin
=========================

This is plugin for building docker images with composer

2.0.2(9y ago)010[1 issues](https://github.com/Bukharovsi/docker_plugin/issues)Apache 2.0PHP

Since Jan 16Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Bukharovsi/docker_plugin)[ Packagist](https://packagist.org/packages/bukharovsi/docker_plugin)[ RSS](/packages/bukharovsi-docker-plugin/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (12)Versions (10)Used By (0)

PHP Docker plugin
=================

[](#php-docker-plugin)

[![Build Status](https://camo.githubusercontent.com/bdf8577e8dae424cc87378ec78fa16609112f221a8e466235959ff7a90ca83e5/68747470733a2f2f7472617669732d63692e6f72672f42756b6861726f7673692f646f636b65725f706c7567696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Bukharovsi/docker_plugin)[![Codacy Badge](https://camo.githubusercontent.com/298f3049f8185c7cc51b423e7392672da85e3dce42d52b4b5d0e4018ce890343/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3964633462633931343236373434623362383132636261353464633832356437)](https://www.codacy.com/app/bukharovSI/docker_plugin?utm_source=github.com&utm_medium=referral&utm_content=Bukharovsi/docker_plugin&utm_campaign=Badge_Grade)[![Dependency Status](https://camo.githubusercontent.com/6cb0216417ecf7c6cc60e714403610470760fa25a519a22a0d13dbb6eaee5e56/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3538613736333636346361373666303034376465313731342f62616467652e7376673f7374796c653d666c61742d737175617265)](https://www.versioneye.com/user/projects/58a763664ca76f0047de1714)

PHP Docker plugin is a plugin for composer that helps build and push docker images. It is very useful for continuous integration. This plugin allow you to define image name, compute tags and generate reports.

When you use this plugin you still need `Dockerfile`. The plugin only simplified automation build!

Basic usage
-----------

[](#basic-usage)

If you already have `Dockerfile` and can build image manually just install plugin and build image immediately and push it to docker registry

```
php composer.phar require bukharovsi/docker_plugin
php composer.phar docker:build
php composer.phar docker:push

```

You will get docker image with tag: &lt;your\_project\_name&gt;:&lt;your\_project\_version&gt;

Advanced usage
--------------

[](#advanced-usage)

### How to change project defaults?

[](#how-to-change-project-defaults)

Defaults can be changed in `composer.json` and with console arguments

#### Change project defaults in `composer.json`

[](#change-project-defaults-in-composerjson)

define in `composer.json` `extra` section:

```
"extra": {
    "docker": {
          "name": "wine_the_pooh.com/honey",
          "version": "1.0",
          "dockerfile": "Dockerfile",
          "workingdirectory": "."
    }
}

```

all definitions are optional

#### Change project defaults with console arguments

[](#change-project-defaults-with-console-arguments)

all arguments are optional

```
php composer.phar docker:build --name wine_the_pooh.com --tag latest --dockerfile Dockerfile --workingdirectory /var/www/wine_the_pooh

```

#### Getting image version from git

[](#getting-image-version-from-git)

If you are using Git for version control or git flow you can generate image tag based on current Git branch or Git tag. For using this feature specify `"version":"@vcs"` in `composer.json` or add `--tag @vcs` to `composer docker:build`and `composer docker:push` command How does Git tag transforms to Docker tag?

Git branchDocker tagmasterlatest, (\*if commit has a git tag then it add docker tag that will be equals current git tag)dev, develop, developmentdevany\_other\_branchany\_other\_branch, Commit SHA### Integration with Teamcity

[](#integration-with-teamcity)

Docker plugin can notify Teamcity about built image versions. This plugin use teamcity environment variables

- `env.BuildTag`
- `env.BuildTag.1`
- `env.BuildTag.2`
- ...
- `env.BuildTag.n`

after running `composer docker:build` you can use `%env.BuildTag%` and other variables in your scripts

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

6

Last Release

3422d ago

Major Versions

v1.0.2 → 2.02017-02-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/57c4e49b3c9104e5370d979c00a0a2b55dd25043692b213fca213ceefc4fb2a4?d=identicon)[Bukharovsi](/maintainers/Bukharovsi)

---

Top Contributors

[![Bukharovsi](https://avatars.githubusercontent.com/u/932921?v=4)](https://github.com/Bukharovsi "Bukharovsi (4 commits)")

---

Tags

build-automationbuild-toolcontinuous-integrationdockerdocker-imagedockerfilephp

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bukharovsi-docker-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/bukharovsi-docker-plugin/health.svg)](https://phpackages.com/packages/bukharovsi-docker-plugin)
```

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[altis/local-server

Local Server module for Altis

18221.6k3](/packages/altis-local-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
