Skip to content

ssk512/docker-compose-v3

 
 

Repository files navigation

Build Status Maven Central

docker-compose-v3

About

This is a small library to load Docker Compose v3 YAML files for further consumption. The driving force is the Docker Client library, where the equivalent to docker stack deploy needs to load such Compose v3 YAML files.

A bit more clarification can be found at issue #2.

Usage

Given a Compose file being available as InputStream and its workingDir you can read the YAML file like this:

InputStream composeStack = getClass().getResourceAsStream('docker-stack.yml')
String workingDir = Paths.get(getClass().getResource('docker-stack.yml').toURI()).parent
ComposeConfig composeConfig = new ComposeFileReader().load(composeStack, workingDir, System.getenv())
...

You can find a real life example at the Docker Client's DeployConfigReader.

Contributing

Please submit an issue if you'd like to ask a question or propose a new feature (maybe Compose v2 support?). Pull Requests are welcome, too!

Publishing/Release Workflow

See RELEASE.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%