Maven plugin to interact with Docker.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Maven plugin to interact with Docker.

The idea of this plugin is to be able to operate Docker from Maven. All elements of the ContainerConfig are supported.

Initial implementation should covers:

  • pull image
  • start container
  • stop container
  • restart container
  • create container
  • remove container
  • kill container

In order to use, add


to your POM.

Then you can execute any goals:

  • mvn docker:pullImage -DcontainerImage=<containerImage>
  • mvn docker:createContainer -DcontainerImage=<containerImage>
  • mvn docker:startContainer -DcontainerId=<containerId>
  • mvn docker:stopContainer -DcontainerId=<containerId>
  • mvn docker:restartContainer -DcontainerId=<containerId>
  • mvn docker:removeContainer -DcontainerId=<containerId>
  • mvn docker:killContainer -DcontainerId=<containerId>

In case two different goals are executed as part of the same Maven session, then these two will share the containerId as long as they execute on the same thread.