Skip to content

A port of Docker client written in groovy meant to make easy to create JUnit tests with Docker.

Notifications You must be signed in to change notification settings

arturschuch/docker-komposer

 
 

Repository files navigation

docker-komposer

Build Status

This project aims to make easy to use docker-compose feature inside Java/Groovy projects.

It comes with an JUnit rule implementation to allow the container creation on java testing.

How to Use:

Import the project dependecy from maven on your specific build tool

Create the Rule object:

    @ClassRule public static KomposerRule container = new KomposerRule("docker-compose-test.yml", "docker.properties", false); // to not execute pull, broken yet :( !!!
    container.getContainers().get("serviceName").getContainerInfo(); // returns the container inspect from docker

The docker.properties file is optional, and can contain:

host= docker host
cert.path= if is a secure connection
# in case of using docker hub to pull private images
hub.user= 
hub.pass=
hub.email=

If property file is informed, docker client will try to connect using environment variables.

About

A port of Docker client written in groovy meant to make easy to create JUnit tests with Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 100.0%