-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Avoiding build or image constraint #627
Comments
When you specify a |
I agree, but why put the contraint in the fig.yml and not use it instead as projectname_servicename |
The nice thing about There has definitely been some discussion about this type of thing before (#541, #213, along with a couple PRs). It seems like |
if (do_build and
self.can_be_built() and
not self.client.images(name=self.full_name)):
self.build() I too was hoping that this constraint is lifted. I have a private registry which causes the It would be nice if docker compose first try the |
Thanks for this proposal! let's continue the discussion in #2092 |
I was looking into the issue I just got regarding having both an image and a build inside my fig config, but I couldn't understand why this constraint exists.
Service .... has both an image and build path specified. A service can either be built to image or use an existing image, not both.
Because I may have both. If my image is not stale (ie. exactly the same as my Dockerfile) running from my image will be faster than rebuilding it. If however my image is stale (or I want to rebuild it just in case) I'd use fig build . I agree that now we save a step when you do a fig up, because it actually builds the image, but it's also a bit confusing. Would it be possible to have some kind of fallback so in case the image is not there it builds it?
The text was updated successfully, but these errors were encountered: