Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: new build config section #2163

Closed
dnephin opened this issue Oct 9, 2015 · 13 comments
Closed

Proposal: new build config section #2163

dnephin opened this issue Oct 9, 2015 · 13 comments
Assignees
Milestone

Comments

@dnephin
Copy link

dnephin commented Oct 9, 2015

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

@thaJeztah
Copy link
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,

@blaggacao
Copy link

+1 can't wait... 💃

@mosop
Copy link

mosop commented Nov 15, 2015

👍

1 similar comment
@marcellodesales
Copy link

👍

@lechen26
Copy link

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

@Silex
Copy link

Silex commented Dec 3, 2015

👍

@ducva
Copy link

ducva commented Dec 7, 2015

👍

@garrettheel
Copy link

Working on this in #2540

@levivm
Copy link

levivm commented Dec 24, 2015

+1

@dnephin
Copy link
Author

dnephin commented Jan 14, 2016

Merged in #2653, carried from #2540

@dnephin dnephin closed this as completed Jan 14, 2016
@marcellodesales
Copy link

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

@ericm24
Copy link

ericm24 commented Jan 18, 2016

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

@marcellodesales
Copy link

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

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

No branches or pull requests