docker-builder icon indicating copy to clipboard operation
docker-builder copied to clipboard

Improve build process - hierarchy

Open zbal opened this issue 9 years ago • 2 comments

Currently, we rely on the builder.yaml file to list known containers, running docker-builder without args builds all the containers defined in the yaml file. Setting args after the bin only builds the required container. BUT it doesn't rebuild containers that depend on it - e.g. rebuild python container should auto rebuild the django container that depends on it.

The dependencies are "defined" in the Dockerfile file, after the FROM keyword.

To be noted:

  • the FROM keyword list the complete name, including the hub.docker username (wiredcraft/bob - is user wiredcraft, container's name bob) - but only bob is set as folder name
  • most likely a dependency tree need to be built from the parsing of all the Dockerfile
  • an option (in docopt) may have to be added to allow / bypass the auto build of dependencies and still limit only to the containers listed
  • we may want to "drop" the containers list from the builder.yaml and rely on the current folder / subfolder -- to be discussed.

zbal avatar Mar 20 '15 03:03 zbal

@zbal have a look at https://github.com/6si/shipwright it automatically generates a build graph from a directory of Dockerfiles

graingert avatar Mar 01 '16 14:03 graingert

@graingert thanks for the note - interesting approach also shipwright - I'll give it a shot!

zbal avatar Jun 15 '16 00:06 zbal