Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docker-client/docker-compose-v3

Open more actions menu

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.