-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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: Remove build features from compose #3732
Comments
👎 from me... |
-1 |
Wow, this was certainly unpopular but no constructive responses really :p Ping @shin- @aanand @vdemeester any opinions? |
Not really sure what constructive response you're looking for other than "please don't do this"? |
I'm actually wondering if you didn't want to create an issue named "proposal: create a new way to build images from some sort of docker-compose-build file", which would actually start a new way for building things, without removing the old ways. Going that path, you can develop and test it, while leaving the old way intact. Once you have your new, shiny and better way, the proposal to remove the "wrong" way as you are referring to here, could be considered without that much of a negative impact, as there would already be an alternative, that at that point might even already have become the accepted best practice... It will also help you find your "constructive responses", as you are building something up, instead of taking away without a real usable alternative. |
@MetalArend perhaps you're right. The initial piece does include related proposals related to keeping the functionality with better abstractions and more separated responsibility. However I take the point that it may have been elucidated better by emphasizing adding then removing, rather than the other way around. |
I think this suggestion failed to gain sufficient traction to move on with so I'm going to close it now. |
Few people have mentioned this and the build functionality in compose seems be causing some ambiguities / issues etc... so wanted to just chuck a proposal on here to start discussion / comments. Couldn't see an existing one along these lines but apologies if there is!
Changes to how compose would operate:
docker-compose build
would be removeddocker-compose
against a compose file with abuild
section(s) would result in no action and a warning that builds are deprecated in compose and to usedocker build
. There would be an override flag which would allow compose to go ahead and pull / run any services in the compose file that don't have abuild
section.Migration strategy:
build
sections from compose files and generate acompose.build
file with a list of equivalentdocker build
commands for each relevantservice
in the compose file. This is not a perfect alternative, but it's a friendly initial time-saver.docker
commands to run, compose.build would instead be a json file with instructions about how to build multiple images (see related proposal)Advantages (reasons for this proposal):
build
thenrun
for single images / containers withdocker
, build then run for multiple / groups of images / containers fordocker-compose
.Disadvantages:
docker build
only supports building one image at a time and compose is a shortcut to building a lot of images from contexts rapidly, this functionality would be lost (see related proposals)Related proposals:
docker
ordocker-compose
tool to take a compose.build file (json?) to do a mass-build of multiple containers (to replace the implicit behaviour when a build section is included in the compose file)docker build
is extended to be able to build multiple images at once?Changes to compose workflows:
docker-compose
is run. This turns a 1-step process into a minimum 2-step process (assuming some other tool in the chain that could build multiple images)docker
with single images / containersList of related issues / PRs:
(not extensive, just from the last few pages of open Issues)
docker-compose.yml
files non-portable #3639 Creating DABs makedocker-compose.yml
files non-portable--build
and--no-build
options torun
analogous toup
command. #3448 Add--build
and--no-build
options torun
analogous toup
command.The text was updated successfully, but these errors were encountered: