-
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
Build on top of or extend another service #2773
Comments
The features has been discussed a few times (#295) also related is #1896 For your use case, I think you can use
|
Thanks for the response, but neither of those address the issue I'm trying to bring up. Maybe I'm not wording it right. I basically want in my Basically a way to do |
Sorry, my understanding was that the reason you wanted the ordering was to solve another problem, so I addressed what I understood was the original problem. For build ordering see: #295 (I did link this one), #1455 (for context on why we probably wont support it), #610, and #583 for related requests. The rest of my comment was in response to:
I'm suggesting that build ordering might not be the best way to solve it. You could instead have just a single service (not two services), and use run to run the adhoc tasks (migrate, cache clean), since it uses the same code, and presumably the same service dependencies. |
Heh, it was my turn to not read carefully. #295 is indeed relevant. Ok, so yeah, I understand. In thinking about this more, I did try breaking it out to two services and sharing files via volumes. I think we can close the issue as duplicate. I think the one that drives home what I was looking for is Anyway, thanks for the replies. I'm going to go ahead and close as a duplicate. |
Is there a way to build an image based on another service, i.e. extend their
Dockerfile
?For example, I have a PHP app that installs a bunch of deps on
build
and startsphp-fpm
onup
called php, then a I have a separate container that runs migrations and clears caches, etc, called app. The thought is I can re-run app and keep php running to minimize downtime when I need to redeploy.Currently, both images need all those deps, so I have to make sure those
RUN
directives in their Dockerfiles are mirrored, but ideally, I could build app on top of php and not have to do that. Is that currently possible or anything that others have interest in?The text was updated successfully, but these errors were encountered: