You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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..
Reacted by Guiomar Valderrama, Sven Pedersen and atomi
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.
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.
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.
Activity
arruda commentedon Sep 22, 2014
Had the same problem, the
depends onlinking would be a good approachnicky-isaacs commentedon Dec 31, 2014
Also having the same problem. Building based on declared order in the
fig.ymlfile would get us what we neededdnephin commentedon 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 buildwould solve your problems. In yourfig.ymlyou can use onlyimages and have shipwright build those images for you in the correct order.I haven't tried this out yet myself, but I will when I get a chance.
aanand commentedon Mar 4, 2015
Two issues on Docker about this: moby/moby#735, moby/moby#4027
dnephin commentedon 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.ymlthat definesdepends_onfor build, and then have another one for "runtime".http://stackoverflow.com/questions/35882331/build-multiple-images-with-docker-compose/35897748#35897748
dnephin commentedon 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 commentedon Jul 27, 2016
dobi includes support for building images in a specific order. One
imageresource 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.