<commit_before>docker-maven-plugin
===================

[![Build Status](https://travis-ci.org/wouterd/docker-maven-plugin.svg?branch=master)](https://travis-ci.org/wouterd/docker-maven-plugin)

A maven plugin to manage docker containers and images for integration tests.

- Minimum required maven version: 3.1.1
- Minimum required docker daemon version: 1.0 (Remote API v1.12)

# Current Functionality:
- Build a docker image from a bunch of source files in package and pre-integration-test phases
      - Allow built containers to be started in the pre-integration phase
- Start a container in the pre-integration-test phase based on an image:
      - Known on the docker host by a name
      - Available in a repository
- Wait for a container to initialize by checking for a phrase in the stderr/stdout of the container
- Link containers (same as docker run --link)
- Shut down containers in the post-integration-test phase that were started in the pre-integration-test phase
- Supply information to the project during the integration-test phase about:
      - Images that were built
      - Containers that were started
- Verifies the build in the "verify" phase which tests if anything upto the integration test phase failed.
- Assign release tags to a docker image in the install phase
- Push docker images to a public or private image registry in the deploy phase
- Docker provider for "local docker" via tcp
- Docker provider for "remote docker" via tcp (boot2docker/vm/server/localhost via tcp)

# Usage

Current release version: `1.6`

Current snapshot version: `2.0-SNAPSHOT`

## Example

      <plugin>
        <groupId>net.wouterdanes.docker</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>1.6</version>
        <configuration>
          <userName>goonwarrior</userName>
          <password><PASSWORD>>
          <email><EMAIL></email>
        </configuration>
        <executions>
          <execution>
            <id>build</id>
            <goals>
              <goal>build-images</goal>
            </goals>
            <configuration>
              <images>
                <image>
                  <id>nginx</id>
                  <files>
                    <file>${project.basedir}/src/test/resources/Dockerfile</file>
                  </files>
                  <keep>true</keep>
                  <nameAndTag>goonwarrior/my-nginx:1.0-SNAPSHOT</nameAndTag>
                </image>
              </images>
            </configuration>
          </execution>
          <execution>
            <id>start</id>
            <configuration>
              <containers>
                <container>
                  <id>Debian</id>
                  <image>debian:wheezy</image><commit_msg>Updated for release 2.0<commit_after>docker-maven-plugin
===================

[![Build Status](https://travis-ci.org/wouterd/docker-maven-plugin.svg?branch=master)](https://travis-ci.org/wouterd/docker-maven-plugin)

A maven plugin to manage docker containers and images for integration tests.

- Minimum required maven version: 3.1.1
- Minimum required docker daemon version: 1.0 (Remote API v1.12)

# Current Functionality:
- Build a docker image from a bunch of source files in package and pre-integration-test phases
      - Allow built containers to be started in the pre-integration phase
- Start a container in the pre-integration-test phase based on an image:
      - Known on the docker host by a name
      - Available in a repository
- Wait for a container to initialize by checking for a phrase in the stderr/stdout of the container
- Link containers (same as docker run --link)
- Shut down containers in the post-integration-test phase that were started in the pre-integration-test phase
- Supply information to the project during the integration-test phase about:
      - Images that were built
      - Containers that were started
- Verifies the build in the "verify" phase which tests if anything upto the integration test phase failed.
- Assign release tags to a docker image in the install phase
- Push docker images to a public or private image registry in the deploy phase
- Docker provider for "local docker" via tcp
- Docker provider for "remote docker" via tcp (boot2docker/vm/server/localhost via tcp)

# Usage

Current release version: `2.0`

Current snapshot version: `2.1-SNAPSHOT`

## Example

      <plugin>
        <groupId>net.wouterdanes.docker</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <userName>goonwarrior</userName>
          <password><PASSWORD></password>
          <email><EMAIL></email>
        </configuration>
        <executions>
          <execution>
            <id>build</id>
            <goals>
              <goal>build-images</goal>
            </goals>
            <configuration>
              <images>
                <image>
                  <id>nginx</id>
                  <files>
                    <file>${project.basedir}/src/test/resources/Dockerfile</file>
                  </files>
                  <keep>true</keep>
                  <nameAndTag>goonwarrior/my-nginx:1.0-SNAPSHOT</nameAndTag>
                </image>
              </images>
            </configuration>
          </execution>
          <execution>
            <id>start</id>
            <configuration>
              <containers>
                <container>
                  <id>Debian</id>
                  <image>debian:wheezy</image>
{'fraction_non_alphanumeric': 0.09807132459970888, 'fraction_numerical': 0.006550218340611353, 'mean_word_length': 2.2411556603773586, 'pattern_counts': {'":': 0, '<': 106, '<?xml version=': 0, '>': 107, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1609480', 'n_tokens_mistral': 1548, 'n_tokens_neox': 1428, 'n_words': 480}