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

Expose docker-compose up --build flag #39

Merged
merged 1 commit into from
Sep 14, 2016
Merged

Expose docker-compose up --build flag #39

merged 1 commit into from
Sep 14, 2016

Conversation

dylanscott
Copy link
Contributor

TL;DR: This PR adds a parameter to Docker::Compose::Session's up method to pass the --build flag to docker-compose.

Long version: There seems to be some long and confusing (at least to me) history with these flags, and despite their names they are not inverses of one another. It appears that way back in the day (when docker-compose was fig) the default behavior was to build images before starting containers, so a --no-build flag was added to speed up the command by suppressing this behavior. Later, the default behavior was changed and the --build flag was added to force a build.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 68.681% when pulling 7c09252 on dylanscott:master into b64fa0d on xeger:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 68.681% when pulling 7c09252 on dylanscott:master into b64fa0d on xeger:master.

@xeger
Copy link
Owner

xeger commented Sep 14, 2016

Hah; I had this exact same change queued up in my local master, but forgot about committing it!

@xeger xeger merged commit 89e3390 into xeger:master Sep 14, 2016
@xeger
Copy link
Owner

xeger commented Sep 14, 2016

To add to the confusion @dylanscott, various minor versions of Docker Compose have temporarily removed one or the other of these flags. Before I added the "don't specify defaulted options" logic -- ugly though it is in our Ruby codebase -- this was a huge problem. With the non-defaulting in place, we can support the union of all CLI parameters that any version of Compose has ever supported.

I'm going to publish v1.0.0 with your changes. I've been using the pre-release for several weeks now and haven't encountered any troubles; this was the last item on my list. Thanks for the contribution.

@dylanscott
Copy link
Contributor Author

Awesome, thanks for the quick turnaround!

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

Successfully merging this pull request may close these issues.

3 participants