docker / libcompose

*Unmaintained/Deprecated* An experimental go library providing Compose-like functionality
https://godoc.org/github.com/docker/libcompose
Apache License 2.0
583 stars 191 forks source link

adding ability to parse default bash variables such as ${foo:-bar} #492

Closed vito-c closed 7 years ago

vito-c commented 7 years ago

title is pretty straight forward. This let's you add default values to your docker-compose file.

web:
# unbracketed name
image: ${IMAGE:-busybox}

parsers to

web:
# unbracketed name
image: busybox
web:
# unbracketed name
image: ${IMAGE-busybox}

parsers to

web:
# unbracketed name
image: busybox
arkban commented 7 years ago

Does this support the ${VARIABLE-default} format (without the ":") as well? https://docs.docker.com/compose/compose-file/#variable-substitution

vito-c commented 7 years ago

@patrick-bohan no but I could add support for that.

vito-c commented 7 years ago

added support for - and some more testing.

vito-c commented 7 years ago

@vdemeester What is the timeline like to get merges?