Skip to content

Proposal: new build config section #2163

Closed

Description

@dnephin

Motivation for this proposal

Proposal

Move all build related configuration into a build: section in the service. Example

web:
  build:
    context: .
    dockerfile: Dockerfile.name
    args:
       key: value
  ...

This should help clarify the fields that are related to the build phase (and the fields that are not).

Backwards compatibility

On the first release both build and dockerfile would still be allowed at the top level of the service definition. A dockerfile at the top level would print a deprecation warning.

On the following release dockerfile at the top level of the service definition would be removed, and it must be under the build section. For trivial cases, a config of build: path/to/context would still be supported.

Related #2111

Activity

  1. thaJeztah commented on Oct 10, 2015

    @thaJeztah
    Member

    I like this approach, sgtm. For the deprecation of the top-level fields; perhaps Compose should add a deprecation policy similar to Engine; https://github.com/docker/docker/blob/master/docs/misc/deprecated.md. This gives users time to adapt, and a clear notice when a feature will be removed,

  2. blaggacao commented on Nov 10, 2015

    @blaggacao

    +1 can't wait... 💃

  3. added this to the 1.6.0 milestone on Nov 13, 2015
  4. mosop commented on Nov 15, 2015

    @mosop

    👍

  5. marcellodesales commented on Nov 17, 2015

    @marcellodesales

    👍

  6. lechen26 commented on Nov 30, 2015

    @lechen26

    is this option was added to docker-compose? the support for build-args?

  7. Silex commented on Dec 3, 2015

    @Silex

    👍

  8. ducva commented on Dec 7, 2015

    @ducva

    👍

  9. garrettheel commented on Dec 14, 2015

    @garrettheel

    Working on this in #2540

  10. levivm commented on Dec 24, 2015

    @levivm

    +1

  11. dnephin commented on Jan 14, 2016

    @dnephin
    Author

    Merged in #2653, carried from #2540

  12. marcellodesales commented on Jan 15, 2016

    @marcellodesales

    Thanks everyone! 👍 Can't wait for this release!

  13. ericm24 commented on Jan 18, 2016

    @ericm24

    +1 Really need --build-arg capability with docker-compose!! Will be MOST GLAD when it is added and released!

  14. marcellodesales commented on Jan 20, 2016

    @marcellodesales

    @ericm24 +1 :) Can't wait too! :)

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions