A library for writing Docker Compose files in Dhall.
Note: Only version 3.0 of the Docker Compose config is supported currently.
If you wish to add another version it is probably worth spending the time to write a json-spec to dhall converter. See dhall-kubernetes' generator.
To experiment with Dhall for config.
-- for the imports in your docker-compose.dhall file you should either download
-- the dhall files or use the URL imports.
let Compose = ./compose/v3/package.dhall
in Compose.Config::{
-- your config here
}
-
brew install dhall-json
-
generate yaml
dhall-to-yaml --file example/docker-compose-deploy.dhall --output ./example/docker-compose-deploy.yml --explain
Note that the yaml keys are alphabetized in the generated yaml.