Skip to content

Improve variable interpolation, required flag and default value. #2441

Description

@aramalipoor

As first proposed in #1377 I think it would be very useful to have a way to set a variable as required, and also set some default value.

web:
   image: org/app:${VERSION?} # Required

Or

web:
   image: org/app:${VERSION:latest} # Default Value

Activity

  1. majidgolshadi commented on Nov 22, 2015

    @majidgolshadi

    👍

  2. dustinblackman commented on Nov 27, 2015

    @dustinblackman

    👍

  3. arm4b commented on Nov 28, 2015

    @arm4b

    👍 for defaults.

  4. valeriangalliat commented on Nov 30, 2015

    @valeriangalliat

    👍

  5. mseashor commented on Dec 2, 2015

    @mseashor

    👍

  6. srstsavage commented on Dec 18, 2015

    @srstsavage

    +1

  7. bennycornelissen commented on Jan 5, 2016

    @bennycornelissen

    👍

  8. plouc commented on Jan 7, 2016

    @plouc

    I'm working on a project where people have heterogeneous env, I'm working on OSX and some are using Ubuntu, when using docker-machine with virtualbox provider, I have to put the full path to make Volume works:

    myservice:
      volumes:
        - ${HOST_VOLUME_PATH}/src:/src

    The problem is now people who don't use virtualbox have to define the value, it should be great if we could have a default value:

    myservice:
      volumes:
        - ${HOST_VOLUME_PATH:.}/src:/src

    In other words 👍

  9. obazoud commented on Jan 7, 2016

    @obazoud

    👍

  10. jlrigau commented on Jan 11, 2016

    @jlrigau

    👍

  11. scasagrande-d2l commented on Jan 13, 2016

    @scasagrande-d2l

    +1

  12. leogamas commented on Jan 13, 2016

    @leogamas

    👍

  13. roll commented on Jan 19, 2016

    @roll

    👍

  14. 12 remaining items

  15. eduardoleal commented on Jul 13, 2016

    @eduardoleal

    👍

  16. Cosmicist commented on Jul 20, 2016

    @Cosmicist

    👍 to have this implemented the same way as in the Dockerfile implementation

  17. bufface commented on Jul 25, 2016

    @bufface

    👍

  18. rubycut commented on Jul 29, 2016

    @rubycut

    👍

  19. xeor commented on Aug 25, 2016

    @xeor

    Anyone got any news about this, it's been a whole 27 days since the last 👍 ?
    Much much needed!

  20. jpbochi commented on Aug 25, 2016

    @jpbochi

    is there a PR already open with this change? Perhaps we need a volunteer to implement it.

  21. phutchins commented on Sep 22, 2016

    @phutchins

    Definitely need this...

  22. hadim commented on Sep 22, 2016

    @hadim

    There is no reason to not implement this...

  23. bongole commented on Sep 28, 2016

    @bongole

    +1

  24. daleobrien commented on Sep 28, 2016

    @daleobrien

    👍 +1

  25. added this to the 1.9.0 milestone on Sep 28, 2016
  26. kouki-o commented on Oct 5, 2016

    @kouki-o

    +1

  27. shin- commented on Oct 5, 2016

    @shin-

    Closing via #3108

  28. srstsavage commented on Oct 5, 2016

    @srstsavage

    🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions