Skip to content

request: add build priority/order #295

Closed

Description

@japrescott

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..

Activity

  1. arruda commented on Sep 22, 2014

    @arruda

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

  2. nicky-isaacs commented on Dec 31, 2014

    @nicky-isaacs

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

  3. dnephin commented on Jan 7, 2015

    @dnephin

    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.

  4. aanand commented on Mar 4, 2015

    @aanand

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

  5. dnephin commented on Mar 9, 2016

    @dnephin

    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

  6. dnephin commented on Mar 21, 2016

    @dnephin

    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.

  7. dnephin commented on Jul 27, 2016

    @dnephin

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions