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

request: add build priority/order #295

Closed
japrescott opened this issue Jul 7, 2014 · 7 comments
Closed

request: add build priority/order #295

japrescott opened this issue Jul 7, 2014 · 7 comments

Comments

@japrescott
Copy link

I love fig and docker but noticed it lacks some functionality; when I want to create a local base image (for instance, baseUbuntu) on which I build a collectd base image, from which I then start my actual service-specific containers (nginx), the order in which these are built is complete random and I get errors stating, the image isn't there. I would find it awesome if I could specify in the fig.yml a "order" number in which fig then builds the images. Or a "dependent of" array, similar to how links is implemented. Or even having fig build the images in the order specified in fig.yml would help alot.
Thanks for giving this a thought..

@arruda
Copy link

arruda commented Sep 22, 2014

Had the same problem, the depends on linking would be a good approach

@nicky-isaacs
Copy link

Also having the same problem. Building based on declared order in the fig.yml file would get us what we needed

@dnephin
Copy link

dnephin commented Jan 7, 2015

There was a post to the docker-user mailing list this morning about a tool https://github.com/6si/shipwright

I think using this in place of fig build would solve your problems. In your fig.yml you can use only images and have shipwright build those images for you in the correct order.

shipwright build
fig up

I haven't tried this out yet myself, but I will when I get a chance.

@aanand
Copy link

aanand commented Mar 4, 2015

Two issues on Docker about this: moby/moby#735, moby/moby#4027

@dnephin
Copy link

dnephin commented Mar 9, 2016

Now that we have depends_on, you can use it to impose an order, however that order will still be used at runtime.

You could split your Compose file into a docker-compose.build.yml that defines depends_on for build, and then have another one for "runtime".

http://stackoverflow.com/questions/35882331/build-multiple-images-with-docker-compose/35897748#35897748

@dnephin
Copy link

dnephin commented Mar 21, 2016

Considering #1455 (Compose is primarily for running an environment, not building images), and that we now have depends_on, I don't think there is anything else to be done here.

@dnephin dnephin closed this as completed Mar 21, 2016
@dnephin
Copy link

dnephin commented Jul 27, 2016

dobi includes support for building images in a specific order. One image resource can depend on another, so they will always build in a specific order. If you're still looking for a tool to handle this problem, you could try it out.

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

5 participants